SyntaxFix
Write A Post
Hire A Developer
Questions
You could also try wrapping the two div's in two div's with unique ids. Then select the div by $("#div1","#wraper1") and $("#div1","#wraper2")
$("#div1","#wraper1")
$("#div1","#wraper2")
Here you go:
<div id="wraper1"> <div id="div1"> </div> <div id="wraper2"> <div id="div1"> </div>