I\'ve thoroughly searched through both StackOverflow and Google, but come up empty. So apologies in advance if this has been asked & resolved already.
NB
Sorry, but did not quite understand your question ... But what you want is to add a parent div? Take it easy ... See if this is what you want:
$(function(){
$('a[rel=popover]')
.popover({
placement : 'bottom',
trigger : 'hover'
})
.on("click", function(){
$(this).closest("div").addClass($(this).data("class")); //Add class .dynamic-class to
});
});
Demo: http://jsfiddle.net/PRQfJ/