Nabs wroteI want to filter elements on page.
Then Samer's suggestion are probably all you need...
I'm not sure about the jQuery filter function, how it works, I guess it goes something like that:
$("#myInput").on('change', function(){
$("#myCollection .element").removeClass("visible");
$("#myCollection .element").filter($("#myInput").value()).addClass("visible");
});
Untested code and I have no idea if that's how you're supposed to use that function! There are better ways to do it, if it works at all.
In your CSS you'll need something like:
#myCollection .element {
visibility: hidden;
opacity:0;
/* you could add some nice CSS3 transitions here, but that's a complicated subject */
}
#myCollection .element.visible {
visibility: visible;
opacity: 1;
}
You could probably also throw in some throttling but in my experience that's not absolutely necessary, but desirable.
Or try that isotope thing that Samer suggested.