Created
September 8, 2011 05:08
-
-
Save agatkamazur/1202672 to your computer and use it in GitHub Desktop.
sortable()
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
jQuery(function(){ | |
$("#lista li").live("click", function(){ | |
$(this).zmienStan(); | |
if ($(this).hasClass('z_glowy')){ | |
$(this).hide('puff'); | |
} | |
}); | |
$('form input[type="text"]:first').focus(); | |
$('#dodaj_robote input[type="submit"]').click(function(){ | |
var robota = $('#dodaj_robote input[type="text"]').val(); | |
var li = $('ul#lista li:first').clone(); | |
var wypelnione_li = li.text(robota); | |
wypelnione_li.removeClass('hidden'); | |
wypelnione_li.usunKlase(); | |
$('ul#lista').prepend(wypelnione_li); | |
$('#dodaj_robote input[type="text"]').val(''); | |
$('input[type="text"]:first').focus(); | |
return false; | |
}); | |
$("#lista ").sortable(); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment