28-09-2011

jQuery Hide all elements containing a certain text value

This simple bit of jQuery code allows you to quickly detect and hide all elements containing a specifed text value on a page:

$("p.value:contains('sometextvalue')").hide();

Comments:

2 comments.
Your comment:

»
Manish ......................magan@:) 30/09/2011, 1:42 pm
It's too good
ekstine Hickory 03/05/2012, 10:49 am
This is great...
Already know where I want to use it

 

[x]