I am using ajax loading for page navigation and am using delegate for the various click events required for each function etc
The problem I am having is activating a slideshow on the home page due to the way the slider is activated.
The following is what I have and obviously the load
does not work as I expected it too...
$('#Content').delegate('#Home','load',function(){
swiper = new Swiper('#swiper', {
mode:'horizontal',
speed:900 ,
loop:true,
});
});
Is there a way I can get around this without implementing an if/switch statement within my navigation coding, as I would rather keep this separate.
i have also tried:
$(document/body).delegate('#Content','change',function(){....
any problems on here I have found are all related to standard problems with delegate like click events not working etc.
Thanks
.on()
should be used api.jquery.com/delegate – bart_88 Jul 19 '13 at 0:18$(document).on('change', '#content', function() { ... })
– adeneo Jul 19 '13 at 0:25