jQuery.exists = function(selector) {
return ($(selector).length > 0);
}
var isanimated=false;
function myslideDown(selector)
{
if (isanimated) return false;
isanimated=true;
selector.animate({
"height": "show",
"marginTop": "show",
"marginBottom": "show",
"paddingTop": "show",
"paddingBottom": "show"
},
{
step: function( now, fx ) {
// $(this).height();
var data = fx.elem.id + " " + fx.prop + ": " + now;
$( "body" ).append( "
" + data + "
" );
}
,
complete: function(){
console.log( 'DONE!!');isanimated=false;
}
});
}
function myslideUp(selector)
{
if (isanimated) return false;
isanimated=true;
selector.animate({
"height": "hide",
"marginTop": "hide",
"marginBottom": "hide",
"paddingTop": "hide",
"paddingBottom": "hide"
},
{
step: function( now, fx ) {
console.log($(this).height());
var data = fx.elem.id + " " + fx.prop + ": " + now;
$( "body" ).append( "
" + data + "
" );
} ,
complete: function(){
isanimated=false;
}
});
}
});
Comments