you are in: codestackercodes [RSS]highlight an element

highlight an element Delicious Email

requires jquery.ui or jquery.color (https://github.com/jquery/jquery-color)

show/hide lines
   1  $.fn.highlight : function (highlightColor, duration) {
   2      var highlightBg = highlightColor || "#FFFF9C";
   3      var animateMs = duration || 2000;
   4      var originalBg = this.css("background-color");
   5  
   6      if (!originalBg || originalBg == highlightBg)
   7          originalBg = "#FFFFFF"; // default to white
   8  
   9      $(this).css("backgroundColor", highlightBg).animate({ backgroundColor: originalBg }, animateMs, null, function () { $(this).css("backgroundColor", originalBg);  });
  10  }
created by leozera — 31 July 2011 — get a short url — tags: jquery embed

Comments



We dont send spam :)

If checked, it's highlights your comment
simple_captcha.jpg
Are you a human? Type the code from the image