rodriquezblue
New Member
Page 1\[code\]<html><head><script src="http://stackoverflow.com/questions/14569572/jquery-1.8.3.js" type="text/javascript"></script></head></head><body><div id="main"></div> </body><script>$('div[id=main]').load('page2.php')$('span[id*=temp]').on('click',function(){alert(this.id); }); //this block of code not working!!</script></html>\[/code\]Page 2\[code\]<div><span id="temp">this is demo</span></div>\[/code\]Basically i want to load page2 again in main div when tag is clicked but am not able to fetch the id of the tag in page one,script of page1 not working for page 2 items or tags