Home>
/*
Invocation example:
$(document) .ready (function () {
$(". quicktip"). qubertip ({
 speed:200
});
});
<a href=""&desktop publishing
* /
jquery.fn.qubertip=function (options) {
  var defaults={
    speed:500,    xoffset:10,    yoffset:10
  };
  var options=$.extend (defaults, options);
  return this.each (function () {
    var $this=jquery (this);
    if ($this.attr ("title")!=undefined) {
      //pass the title to a variable and then remove it from dom
      if ($this.attr ("title")!="") {
        var tiptitle=($this.attr ("title"));
      } else {
        var tiptitle="qubertip";
      }
      //remove title attribute
      $this.removeattr ("title");
      $(this) .hover (function (e) {
        //$(this) .css ("cursor", "pointer");
        $("body"). append ("<div>" + tiptitle + "&/div>");
        $("#tooltip"). css ({"position":"absolute",          "z-index":"9999",          "background":"#d3ddf5",          "background-image":"url (../../quber_image/quber_common/quber_tb_titltbg.png)",          "padding":"5px",          "opacity":"0.9",          "border":"1px solid #a3c0e8",          "-moz-border-radius":"3px",          "border-radius":"3px",          "-webkit-border-radius":"3px",          "font-weight":"normal",          "font-size":"12px",          "display":"none"
        });
        $("#tooltip")
.css ("top", (e.pagey + defaults.xoffset) + "px")
      .css ("left", (e.pagex + defaults.yoffset) + "px")
      .fadein (options.speed);
      }, function () {
        //remove the tooltip from the dom
        $("#tooltip"). remove ();
      });
      $(this) .mousemove (function (e) {
        $("#tooltip")
  .css ("top", (e.pagey + defaults.xoffset) + "px")
  .css ("left", (e.pagex + defaults.yoffset) + "px");
      });
    }
  });
};
  • Previous Analysis of the difference between == and equals () in C #
  • Next Difference between static member functions and non-static member functions in C ++