jquery attribute indexOf
- by Victor
When I am getting at an attribute onclick of custom(Reporting Services) checkbox it gives me correct result. However when I am trying to use indexOf on that result it says "Object doesn't support this property or method", i.e. this is fine, gives me a long string
$('input[id*=CustomCheckBox]').click(function()
{
alert( $(this).attr("onclick") );
});
But this gives an error(object doesn't support this property or method):
$('input[id*=CustomCheckBox]').click(function()
{
if ($(this).attr("onclick").indexOf("SomeString") > -1 )
{
//do some processing here
}
}
What would I need to modify so that indexOf is working properly?