Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Apr 30th, 2012  |  syntax: None  |  size: 0.73 KB  |  hits: 13  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. If css() == X, else, not working, forms not working
  2. function toggleChat(obj){
  3.     current_margin = $(obj).css('marginBottom');
  4.     if (current_margin == 0){
  5.             $(obj).animate({marginBottom : "-270px"}).removeClass("active_box").addClass("hidden_box");
  6.     }else{
  7.         $(obj).animate({marginBottom : "0"}).removeClass("hidden_box").addClass("active_box");
  8.     }
  9. }
  10.        
  11. function toggleChat(obj) {
  12.   var currentMargin = parseInt($(obj).css('margin-bottom'));
  13.   if (currentMargin === 0) {
  14.     $(obj).animate({ marginBottom: "-270px" })
  15.           .removeClass("active_box")
  16.           .addClass("hidden_box");
  17.   } else {
  18.     $(obj).animate({marginBottom : "0px"})
  19.           .removeClass("hidden_box")
  20.           .addClass("active_box");
  21.   }
  22. }