Auto load stop working on version 1.5.3
-
Hi,
I just updated the plugin to version 1.5.3 on my local machine, and the plugin stopped working.
The ‘scrollSpy:exit’ just doesn’t trigger on $(‘hr[data-powered-by=”alnp”]’).
I think the reason that it is happening is because the element $(‘hr[data-powered-by=”alnp”]’) is dynamically created with
$( content_container ).prepend( '<hr style="height:0px;margin:0px;padding:0px;border:none;" data-powered-by="alnp" data-initial-post="true" data-title="' + post_title + '" data-url="' + orig_curr_url + '"/>' );
And that can cause issues when trying to attache event on that element, see: https://stackoverflow.com/questions/1359018/in-jquery-how-to-attach-events-to-dynamic-html-elementsBecause if I try to change the element to an element which is not dynamically created, the event does get triggered:
$( '.test' ).on( 'scrollSpy:exit', function(){ alert('This works!') });
- The topic ‘Auto load stop working on version 1.5.3’ is closed to new replies.