I have html table, and inside the table in each tr line i have the next code :
<table>
<tr><td> <div id="popup_button">Save</div> </td></tr>
<tr><td> <div id="popup_button">Save</div> </td></tr>
<tr><td> <div id="popup_button">Save</div> </td></tr>
<tr><td> <div id="popup_button">Save</div> </td></tr>
</table>
and js function is :
$("#popup_button").click(function(){
alert("HELLO");
});
The problem is, when i click the #1 line div, its working, BUT when i’m trying to click all the other lines its not working, and again only the #1 line div in table working ,why is that?
You are in wrong way.Instead of same ID must use
class.Its not a good way.