tags:

views:

39

answers:

1

Hi,

Can someone pls point me to the documentation that provides/explains all possible filter parameters allowed.

Some of the examples I have seen are :first and :last - anymore?

Thanks. Tony.

+2  A: 

http://docs.jquery.com/Selectors

Those are just the built in ones, though. You can actually create your own!

So if you wanted to get all <div> elements that satisfied a certain criteria through a filter, you could do:

$.expr[':'].big = function(e) {  
    return $(e).width() > 500;
};
$('div:big'); // would only select divs that are over 500 pixels wide
Paolo Bergantino
Thanks for that but I trying to apply the following filtering using the jQuery Scrollable plugin, i.e: var itemToRemove = api.getItemWrap().filter("#slot" + ptabIndx); itemToRemove.remove();where slot is defined as follows but it can't seem to find it, i.e:<a class="" href="2"><div id="slot2">Any ideas?
tonsils
You'll notice that the selector for your "slot" is ("#slot" + ptabIndx) - when ptabIndx is given a value, such as "2" the selector then effectively becomes ("#slot2") which targets your <div id="slot2">
Jason Berry
As you're starting from a wrapper (aka parent) you probably want to be using `find` instead of `filter`.
searlea