jquery bind the same event ID

This link: https: //blog.csdn.net/lan_13217/article/details/84079441

http://hi.baidu.com/meneye/blog/item/1e3e871e5f95f5034034177c.html

Case:
<div the above mentioned id = "div1"> content </ div>
<div the above mentioned id = "div1"> content </ div>
<div the above mentioned id = "div1"> content </ div>
<div the above mentioned id = "div1"> Content </ div>
<div ID = "DIV1"> SUMMARY </ div>
<div ID = "DIV1"> SUMMARY </ div>
<div ID = "DIV1"> SUMMARY </ div>
<div ID = "DIV1" > contents </ div>
<div ID = "DIV1"> SUMMARY </ div>
problem:
. $ ( "DIV1") the bind ( "the Click", function () {
Alert ($ (the this) .val ());
});
we are bound to div1, when we click on div, only the first div pop-up alert, and the other did not pop up.
Goal:
I think every event a div is bound
to solve:
. $ ( "Div1") Live ( "the Click",






Disclaimer: This article is CSDN blogger "lan_13217 'original article, follow the CC 4.0 by-sa copyright agreement, reproduced, please attach the original source link and this statement.
Original link: https: //blog.csdn.net/lan_13217/article/details/84079441

Guess you like

Origin www.cnblogs.com/niudaxianren/p/11389001.html