Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

128
Visualizações
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
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda