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 -

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

Why does a .NET 4.0 program produce a system.unauthorizedAccess error on a Windows Server 2012 machine with .NET 4.5 installed? -