Is there a JQuery equivalent of ASP.Net Ajax\'s $find() function?
$() != $find()
If you want to find an element by its ASP.NET code ID rather than the generated ClientID (ctl00_RealId) then you can use this function. It just looks for elements that have an ID that ends with _{the real ID here}:
var $$ = function (id, context) {
var $ = (jQuery) ? jQuery : return ;
var el = $("#" + id, context);
if (el.length < 1)
el = $("[id$=_" + id + "]", context);
return el;
}
For example, say your ID in your code is pnlSuccess, say a panel:
But in the rendered code it comes out as: ctl00_content_ctl00_pnlSuccess
calling $$("pnlSuccess") will find that rendered panel.