javascript - Will DOM reconstructs after partial view is loaded via ajax? -
div filled using ajax call returns partial view . in case,do dom reconstructed ? . since ,i have javascripts preloaded handle client side events of partial view .do need attach event handler using live event or on event (jquery).
ajax calls load partial views without reconstructing entire page. make sure aren't firing click events off of submit button (unless preventing default stop post back). since partial loaded after page has loaded need keep script in main page tie events document instead of selector. like
$(document).on('click', '.classselector', function(){ //your code here }); a click event defined in way trigger off of items on partial
Comments
Post a Comment