Created
March 23, 2010 21:16
-
-
Save raulsouzalima/341665 to your computer and use it in GitHub Desktop.
This file contains 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
// Editar título bloco | |
$(".click_edit").click(function() { | |
var obj = $(this); | |
var text = obj.text(); | |
obj.html('<input type="text" value="" class="test" />'); | |
obj.find('.test').focus().select(); | |
obj.find('.test').blur(function() { | |
var replace_field = $(this).val(); | |
if (replace_field == '') | |
replace_field = text; | |
obj.html(replace_field); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment