deleting the parent div using jquery

bri111

New Member
I have a jquery scripts aimed at deleting the parent div. However, the delete button doesn't appear as a button and won't delete the parent div. I am using jQuery Mobile. Here is the jquery:\[code\] $(".delete_content").click(function() { $(this).closest(".content_container").remove(); });\[/code\]Here is the html:\[code\]<div class='content_container'> <a class='delete_content' data-role='button' data-icon='delete' data-inline='true' data-iconpos='right'> Delete </a></div>\[/code\]
 
Back
Top