0

I am puzzled by the reference to the word 'not' in the following code:

$("select, input[type=file]").not('select[multiple]').uniform();    

Could someone please explain it for me?

4

1 回答 1

1

That's the .not() method. It removes any elements from the current matched set that match the given selector.

The initial jQuery call selects all the <select> and <input type="file"> elements on the page. The .not() specifically excludes any <select> elements with the multiple attribute, removing them before the .uniform() call.

于 2012-12-22T20:01:50.063 回答