jquery - remove last div in a group
How can I remove the very last DIV identified by id begining with letters "section" (eg: "section99") in a DIV identified by id="groupA"
currentTab = "A";
$('#subPart').click(function() {
name = "#group" + currentTab;
....
$(something开发者_JAVA百科).remove();
return false;
});
Try This script
$('#groupA').find('div[id^="section"]:last').remove();
精彩评论