var bigWidth=800; $("#map").width() == bigWidth ? $("#map").fadeOut(300).fadeIn(300).fadeOut(300).fadeIn(300).animate({ height: 400, width: 400 }) : $("#map").fadeOut(300).fadeIn(300).fadeOut(300).fadeIn(300).animate({ height: 400, width: 800 });
Tuesday, December 22, 2015
Smooth expansion of DIV with jQuery
Tuesday, December 15, 2015
Javascript padding
function pad(str, character, max, side, visibility) { str = str.toString(); console.log('inside pad: '+str); var pad; var output; pad=''; for (var i=str.length;i<max;i++ ) { pad = pad + character; } pad="<span style='visibility:"+ visibility + "'>" + pad + "</span>"; side=='left'? output=pad+str : output=str+pad ; return output; } input=$('#serialnumber').text(); $('#serialnumber').html( pad( input, 'F', 16, 'right', 'hidden') );
Subscribe to:
Posts (Atom)