How do I return a subset in jQuery plugin?
Posted
by wamp
on Stack Overflow
See other posts from Stack Overflow
or by wamp
Published on 2010-06-09T04:14:18Z
Indexed on
2010/06/09
4:22 UTC
Read the original article
Hit count: 135
By default it's like this:
$.fn.ellipsis = function() {
...
return this.each(function(){
//do some operation on each element here to see if it qualifies
}
}
But now I want to return a subset of all, only those qualify in this.each(function() {})
,
how to modify the code so that it finally returns only those that qualify?
© Stack Overflow or respective owner