I want to throw an alert when an input has a \'readonly\' attribute. I have tried this:
if($(\'input\').attr(\'readonly\') == \'readonly\'){ alert(\"foo\"
Try a simple way:
if($('input[readonly="readonly"]')){ alert("foo"); }