var prescTabs= $("#prescTabs"); if(prescTabs.size()>0) { prescTabs.find("tr:not(:first)").remove(); }