Get td by name using jQuery?

as the topic says, how do I get td in the table by name? Then I want to hide it.

Thanks in advance.

+4
source share
4 answers

You can do it:

$('td[title=Herbert]').hide(); 
+2
source

Sort of...

 $('table[title="the title"]').hide(); 

or when using the header ...

 $('table[caption="the caption"]').hide(); 

Considering the following:

If you want to use any of the metacharacters (#; &, + * ~ ': "! ^ $ => | /) As the literal part of the name, you should avoid the character with two backslashes: \\. For example, if you have input with names name = "[]", you can use selector $ ("input [name = names \\ [\\]]").

By Selectors - JQuery API

+2
source
 $("td[title='mytitle']").... 

look at this link:

http://api.jquery.com/attribute-equals-selector/

+1
source

By name as an attribute: td[title="table title"]

By title as contents: td:contains(table title)

Please be more explicit.

0
source

All Articles