without wrapping jQuery search result

Posted by uzay95 on Stack Overflow See other posts from Stack Overflow or by uzay95
Published on 2010-04-04T19:33:49Z Indexed on 2010/04/04 19:43 UTC
Read the original article Hit count: 129

Filed under:

ASP.NET is changing id, name values according to control's parent control name. That's why i am searching id with JQUERY as below.

// $ is looking to the end of "id" attribute of input elements
$("input[id$='cbAddToNews']")

Only one element is returning by jQuery. But when i want to change the attribute, I'm using this syntax:

$($("input[id$='cbAddToNews']")[0]).show()

Is there any way to do this without wrapping it with $(...[0]) ?

© Stack Overflow or respective owner

Related posts about jQuery