
Untitled
By: a guest on
Apr 30th, 2012 | syntax:
None | size: 0.73 KB | hits: 13 | expires: Never
If css() == X, else, not working, forms not working
function toggleChat(obj){
current_margin = $(obj).css('marginBottom');
if (current_margin == 0){
$(obj).animate({marginBottom : "-270px"}).removeClass("active_box").addClass("hidden_box");
}else{
$(obj).animate({marginBottom : "0"}).removeClass("hidden_box").addClass("active_box");
}
}
function toggleChat(obj) {
var currentMargin = parseInt($(obj).css('margin-bottom'));
if (currentMargin === 0) {
$(obj).animate({ marginBottom: "-270px" })
.removeClass("active_box")
.addClass("hidden_box");
} else {
$(obj).animate({marginBottom : "0px"})
.removeClass("hidden_box")
.addClass("active_box");
}
}