views:

37

answers:

1

Hi everyone,

I am just wondering whether that is a correct syntax in JQuery :

var elements = $("#contact-area input[type=text,value=something] ").get();

What I mean is how to write specify more than one parameter to and filter apart from this use :

$("#contact-area (input[type=text],input[value=something])").get();
+2  A: 

put each attribute in it's own [] (no spaces in between attributes).

var elements = $("#contact-area input[type=text][value=something] ").get();

or

var elements = $("#contact-area input:text[value=something] ").get();
Russ Cam
Awesome thanks,I was knowing something pretty wrong.
Braveyard
No probs - take a look at the documentation - http://docs.jquery.com/Selectors/attributeMultiple#attributeFilter1attributeFilter2attributeFilterN
Russ Cam