How to get multiple names in a jQuery element selector? -


i want apply script on multiple pages var should read 3 names not one; how looks now:

var first; $(document).ready(function() {   first = $('[name=body]').val(); }); 

need or " || " or , " && " how name 'body','body2' , 'body3', depends on page it. please help

thanks all,

you can list multiple items in selector, this:

var body; $(function() {    body = $('[name=body], [name=body2], [name=body3]').val(); }); 

Comments

Popular posts from this blog

django - How can I change user group without delete record -

java - Need to add SOAP security token -

java - EclipseLink JPA Object is not a known entity type -