Friday 15 June 2012

jquery - Removing a parent row if a specific value is found -



jquery - Removing a parent row if a specific value is found -

i have table without specific class or id, , i've remove table rows have links within specific attribute value (href*=...) within table, or matter, anywhere on web site. can rid of links, not row has link within it. how can css? if not, jquery or js?

there no css parent selector, it's not possible css alone.

you can jquery though, using attribute selectors:

$('table a[href=somethingspecific]').closest('tr').remove();

or, select anchors , filter them (quicker):

$('table a').filter(function(){ homecoming $(this).attr('href') == 'somethingspecific'; }).closest('tr').remove();

jquery css3

No comments:

Post a Comment