/ Published in: jQuery
Quick script to find button elements (and elements with the "button" class) and wrap their innards in spans. Good for making rounded-corner buttons.
Expand |
Embed | Plain Text
$("button, .button").each(function() { var hasSpan = $(this).find("span")[0]; if (hasSpan = "undefined") { $(this).wrapInner("<span></span>"); } });
You need to login to post a comment.
