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

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

jsf - How to ajax update an item in the footer of a PrimeFaces dataTable? -

django - CSRF verification failed. Request aborted. CSRF cookie not set -