Created
October 28, 2008 16:34
-
-
Save cnix/20418 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('.btn').each(function(){ | |
var b = $(this); | |
var tt = b.html() || b.val(); | |
if ($(':submit,:button',this)) { | |
b = $('<a>').insertAfter(this). addClass(this.className).attr('id',this.id); | |
$(this).remove(); | |
} | |
b.text('').css({cursor:'pointer'}). prepend('<i></i>').append($('<span>'). html(tt).append('<i></i><span></span>')); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment