Skip to content

Instantly share code, notes, and snippets.

@agatkamazur
Created September 8, 2011 05:08
Show Gist options
  • Save agatkamazur/1202672 to your computer and use it in GitHub Desktop.
Save agatkamazur/1202672 to your computer and use it in GitHub Desktop.
sortable()
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