הצ'אט

רשומות פופולריות

יום שבת, 14 בספטמבר 2013

frsd


function init(elem, options){
elem.addClass('countdownHolder');

// Creating the markup inside the container
$.each(['3','2','5','39'],function(i){
$('').html(
'\
0\
\
\
0\
'
).appendTo(elem);

if(this!="Seconds"){
elem.append('');
}
});

}

// Creates an animated transition between the two numbers
function switchDigit(position,number){

var digit = position.find('.digit')

if(digit.is(':animated')){
return false;
}

if(position.data('digit') == number){
// We are already showing this number
return false;
}

position.data('digit', number);

var replacement = $('
',{
'class':'digit',
css:{
top:'-2.1em',
opacity:0
},
html:number
});

// The .static class is added when the animation
// completes. This makes it run smoother.

digit
.before(replacement)
.removeClass('static')
.animate({top:'2.5em',opacity:0},'fast',function(){
digit.remove();
})

replacement
.delay(100)
.animate({top:0,opacity:1},'fast',function(){
replacement.addClass('static');
});
}

0 תגובות:

הוסף רשומת תגובה

תגובה!!! כאן!!!

מזג האוויר 24/7

ירושלים  +9°    תל אביב  +12°    חיפה  +12°    באר שבע  +10°    אילת  +16°    Mavir.co.il