¡@

Home 

2014/10/16 ¤W¤È 12:01:46

jquery Programming Glossary: a.filter

Jquery: Selection within a selection

http://stackoverflow.com/questions/1266604/jquery-selection-within-a-selection

this previous selection a and just return elements of type input jquery selection share improve this question a.filter 'input' .each function alert 'My name is ' this .attr 'name' To just get a selection from the current selection this way.. function alert 'My name is ' this .attr 'name' To just get a selection from the current selection this way var inputs a.filter 'input' You can even comma separate selectors var els a.filter 'input .fooMonger #something' See http docs.jquery.com Traversing..

Hide all elements except one div and its child element

http://stackoverflow.com/questions/4277792/hide-all-elements-except-one-div-and-its-child-element

jQuery function to get all unique elements from an array?

http://stackoverflow.com/questions/5381621/jquery-function-to-get-all-unique-elements-from-an-array

use array. filter to return the first item of each distinct value var a 1 5 1 6 4 5 2 5 4 3 1 2 6 6 3 3 2 4 var unique a.filter function itm i a return i a.indexOf itm alert unique returned value Array 1 5 6 4 2 3 If supporting IE8 and below is primary..

javascript remove array from array

http://stackoverflow.com/questions/7669555/javascript-remove-array-from-array

Assuming you're on a browser that has Array.prototype.filter and Array.prototype.indexOf you could use this var c a.filter function item return b.indexOf item 1 If the browser in question does not have those methods you may be able to shim them...