Pradeep
Pradeep

Reputation: 1

how to hide a tag which contains "text" as the title

I want to hide a tag which contain the title as "question" this a tag is not generated by me. so it does not have a ID.

this is the jQuery i wrote but it seems to be not working

    <script type="text/javascript">
jQuery.noConflict();
jQuery(document).ready(function(){
jQuery("a:contain('Question')").hide();
});

</script>

can someone help me

Upvotes: 0

Views: 107

Answers (2)

GreyBeardedGeek
GreyBeardedGeek

Reputation: 30088

You have it almost correct. The selector is "a:contains('Question')"

(It's contains, not contain).

See http://jsfiddle.net/YCCVc/

Upvotes: 1

nickw444
nickw444

Reputation: 966

$('selector[title="Question"]').dosomething()

Upvotes: 0

Related Questions