I’ve inherited some javascript, and it’s not all working as expected at the moment. This is one sticking point:
jQuery("#theForm")
.find("input[@checked], input[@type='text'], options[@selected], textarea")
.each(function() { ... });
I’m not familiar with the [@] syntax (though it seems clear what it wants to have happen), and I’m not finding documentation. Can anyone tell me if this is valid jquery?
The
@is an xpath selector (has attribute), which has been deprecated since jQuery 1.1.4. Just leave it out, or replace those with pseudo-selectors:See http://api.jquery.com/category/selectors/