javascript - Apply a jQuery script already present in the page only the html called by Ajax, not on all html documents -


i created generalists jquery scripts of html tags:

<script src="./scripts/public/scripts.js"></script>

i html tags called ajax benefit these scripts. added function $.getscript() in code:

$('.ajax-global').on('click', function(){     var param = $(this).attr('id');     $('.ajax-window').load('./ajax/' + param + '.php', function(){         $.getscript("./scripts/public/scripts.js");     }); }); 

the problem code affects entire page, or wish limited ajax code called...

how proceed?


Comments

Popular posts from this blog

python - No exponential form of the z-axis in matplotlib-3D-plots -

php - Best Light server (Linux + Web server + Database) for Raspberry Pi -

c# - "Newtonsoft.Json.JsonSerializationException unable to find constructor to use for types" error when deserializing class -