This is scenario:
Click on "Messages" icon several times, than click on "Inbox" and see what is happening.
@devoopsme You can not load ajax-content the way you did here: every ajax-page which contains javascripts, will be executed on first load of .ajax-content, and every next load after that will result in re-execution of those scripts, which often lead to multiple load of plugins (i.e datatables, xchart...) and multiple script executions, and messing whole app. To fix this, one may use 3rd party script loader (RequireJS, YepNope) and rewrite your devoops.js ajax-loader. You must use conditional script loader instead of loading HTML DOM with jQuery $(selector).html("content");
There is also other approach without 3rd party JS plugins, but it would require switching to AngularJS, because this issue is result of jQuery limitations.
This is scenario: Click on "Messages" icon several times, than click on "Inbox" and see what is happening.
@devoopsme You can not load ajax-content the way you did here: every ajax-page which contains javascripts, will be executed on first load of .ajax-content, and every next load after that will result in re-execution of those scripts, which often lead to multiple load of plugins (i.e datatables, xchart...) and multiple script executions, and messing whole app. To fix this, one may use 3rd party script loader (RequireJS, YepNope) and rewrite your devoops.js ajax-loader. You must use conditional script loader instead of loading HTML DOM with jQuery $(selector).html("content");
There is also other approach without 3rd party JS plugins, but it would require switching to AngularJS, because this issue is result of jQuery limitations.