Sonntag, 15. April 2012

setVisible for jQuery

I really wonder why jQuery has no setVisible(...) function?!? Here's mine:

(function($){
  $.fn.setVisible = function(visible){
    if(visible === true){
      this.show();
    }
    else{
      this.hide();
    }
  };
}(jQuery));