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
$( "#date" ).datepicker(); |
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
<input id="date" type="text" name="name" /> |
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
if ($(this).hasClass('z_glowy')){ | |
$(this).hide('puff'); | |
} |
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
$("#lista ").sortable(handle: "li a"); |
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'); | |
} | |
}); |
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
$("#lista li").live("click", function(){ | |
$(this).zmienStan(); | |
}); |
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
zmienStan: function( ) { | |
this.usunKlase(); | |
return this.each( function(){ | |
var el = $(this); | |
var indeksStanu = el.data('indeksStanu') || 0 | |
indeksStanu = (indeksStanu + 1) % jQuery.fn.stany.length | |
el.data('indeksStanu', indeksStanu) | |
.addClass(jQuery.fn.stany[indeksStanu]); | |
}); | |
} |
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
zmienStan:function( ) { | |
this.usunKlase(); | |
return this.each( function(){ | |
// tu umieścimy instrukcje dodające właściwą klasę | |
}); | |
} |
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
usunKlase:function() { | |
var element = this; | |
jQuery.each(jQuery.fn.stany, function(index, value) { | |
element.removeClass(value); | |
}) | |
return this; | |
} |
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
$.fn.extend({ | |
stany:['nowe', 'w_trakcie', 'z_glowy'], | |
zmienStan:function( ) { | |
this.usunKlase(); | |
} | |
}); |
NewerOlder