Timothy Ruhle Timothy Ruhle - 1 year ago 113
jQuery Question

jQuery remove table row with non-standard id characters

I am trying to remove a table row using jQuery like this

function removeTableRow(trId){
$('#' + trId).remove();

However this doesn't work if the id contains a character like "%", "^", "&", ",", etc....

Do you know if there is any work around for this?

Answer Source

I believe the reason why can be found here: What is a valid value for id attributes in html

However I'm not so sure about a workaround other than the obvious (change your ids)

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download