jquery - Document Ready not firing when expected -
i have site , pages loaded ajax.
i load first page , using
if (window.jquery) { alert('jquery loaded'); } it alerts jquery has been loaded every time.
i have in page following
$(document).ready(function() { alert('document ready'); } the document ready alert doesn't fire first time works second time around.
what has happen document ready?
i don't understand why doesn't work first time around.
i use following load page:
$('#load-page').load(''+base_href+''+page+'', 'show=all'+show_field_id+''+show_default_sort+''); thank you
$( document ).ready(function() { console.log( "ready!" ); }); i think didn't close code right.
Comments
Post a Comment