Hmm .. Ok .. $ var looks like PHP .. I would just call it. In addition, you have #. in your myTbl, which means id and class .... so it depends on how you identify the cells .. but assuming the cells are td inside the ID'd table "myTbl", try this
$(".closethis").click(function(){ var checkDiv = $(this).parent().parent(); if (checkDiv.attr("id") == "mainArea") { $("#myTbl").find('td').removeClass("myClass"); } });
If you cannot complete this work, give us the identifier or class of each element, and we will be able to provide you with the correct code.
source share