In this subject you can wrap a widget with the title outside but if you don't want a title, a <div>
will not be closed, and the template is broken. So I would like to do this in jQuery instead of the widget function. I tried many times but it doesn't work!
-
Close-voted as off-topic. As currently written, this is a jQuery question, not a WordPress question.– Chip BennettCommented Apr 10, 2012 at 17:11
Add a comment
|
1 Answer
I updated your jsfiddle: http://jsfiddle.net/geertdd/gNzun/3/
var $widget = $('.widget');
$widget.wrapInner('<div class="inner_widget" />');
var $title = $('.widget_title').remove();
$widget.prepend($title);