Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

130
Views
Undefined (reading 'childNodes') List.js with my list being rendered by Ajax call

I can't figure out why it's throwing me an error but when I check if my list is being rendered it is there.

Front end

<div id="calendar-events-list" class="events-listing">

    foreach(sample_arr) {
         echo '<ul class="events-by-date list"></div>';
    }

    <nav class="events-calendar-pager events-pager" data-value="">
        <a class="page-prev disabled" href="#"></i></a>
        <ul class="pagination"></ul>
        <a class="page-next" href="#"></i></a>
     </nav>';
</div>

Js file

    $.ajax({
                method: 'post',
                url: path+'js/ajax/get-events.php',
                data: {
                    // 'current_month': instance.month,
                    'current_year': instance.year,
                    'current_period': instance.current_period,
                    'action': action,
                    'views': views,
                    'limit': instance.limit,
                    'xid': c_xid
                },dataType: 'json'

            }).done(function(data){

                if($('ul.list li').length){
                    var events_calendar_options = {
                        valueNames: ['side'],
                        pagination: true,
                        page: 3,
                        innerWindow: 2,
                    };
        
                    var eventList = eventsPagination('calendar-list', options);
                    eventList.update();
                }
            } // close ajax

...
// when user clicked a date from a calendar, the events (my list array) on that date should show
$container.on('click', $element, function(){
if($('ul.list li').length){
                
            var options = {
                valueNames: ['side'],
                pagination: true,
                page: 3,
                innerWindow: 2,
            };

            var eventList = eventsPagination('calendar-list', options);
            eventList.update();

        }
}

There's nothing wrong with my eventsPagination() function as the other ones are working properly. It just this one is throwing me an error once I change the date and pass thru ajax and then return my new events array. And my list of events array will only show once they click a specific date in the calendar.

Really appreacite your help!

over 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!