Reputation: 15379
I'm trying to remove all the elements within a div (.shipping_address_table
) except for one table that has the class theTable
.
I think I am using the html()
wrong here. But it seems like this should be pretty close.
$(this).parents('div#wrapper').find('div.shipping_address_table').html().remove(':not(.theTable)');
Upvotes: 0
Views: 84
Reputation: 23560
$("#wrapper").find('div.shipping_address_table').children(':not(.theTable)').remove();
Upvotes: 1