asp.net - Jquery Select all asp labels in a div -
how select list of asp labels within div?
<div id="mydiv"> <asp:label id="mylabel".../> <asp:label id="mylabel".../> </div>
this jquery code not work.
$("#mydiv label").each(function(){ alert("show msg");});
any assistance appreciated.
try this:
$("#mydiv span[id*=mylabel]").each(function(){ alert("show msg");});
since, asp:label
rendered span
in html.
also, please give unique id asp labels mylabel1
, mylabel2
, etc.
Comments
Post a Comment