How to get multiple names in a jQuery element selector?
jquery
Solution
You can list multiple items in the selector, like this:
var body;
$(function() {
body = $('[name=body], [name=body2], [name=body3]').val();
});
Problem
i want to apply my script on multiple pages so the var should read 3 names not just one; this is how it looks now: ``` var first; $(document).ready(function() { first = $('[name=body]').val(); }); ``` need to do an or " || " or an and " && " some how so the name could be 'body','body2' and 'body3', depends on what page is it. please help Thanks all,