Jump to content

Filter help


undertaker

Recommended Posts

I dont know if this is ajax, but i need some help with javascript using jquery.

 

I. I have many images on page, and every one has some classes.

Now i would like that when i insert that class into input field and press enter, all images with that class stays, and other dissapears. We could say it is some kind of search.

 

For example:

 

<img src="1.png" class="design boobs" />

<img src="2.png" class="design tractor" />

<img src="3.png" class="other obama" />

<img src="4.png" class="other ipad" />

 

so if i for example insert design and press enter, only 1 and 2 stays or if i insert boobs only 1 stays and other dissapear.

 

EDIT: If there is possible i would also need an option to show all, and text if there werent any images found.

 

Thanks :)

-S

Link to comment
https://forums.phpfreaks.com/topic/231266-filter-help/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.