/ 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
Copy this code and paste it in your HTML
$("button, .button").each(function() { var hasSpan = $(this).find("span")[0]; if (hasSpan = "undefined") { $(this).wrapInner("<span></span>"); } });
Comments
