I have a link in worpress page

<a onclick="show_trend()" >Trend</a>

and i am calling an ajax function onclick.

function show_trend() {
    // This does the ajax request
        url: ajaxurl,
        data: {
        success:function(data) {
            // This outputs the result of the ajax request
        error: function(errorThrown){

what i want to do when calling this function is display a div section .for that ,this is my function

function render_admin_charts_page() {
    <div class="wrap">
        <div class="em-bookings-events">
            <h2><?php esc_html_e('Event Booking Report','dbem'); ?></h2>        
            <?php em_bookings_events_table(); ?>

ajax function is calling but not rendering to div

Read more here: Creating a new div onclick wordpress+ajax


If you know the solution of this issue, please leave us a reply in Comment section, to update the question.

Related Wordpress search:

, , ,

Wordpress related questions and answers: