Skip to content

Commit

Permalink
Bug fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
urin committed Feb 9, 2014
1 parent 5b7e3f8 commit 3c9d2b3
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 20 deletions.
32 changes: 16 additions & 16 deletions balloon.jquery.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,21 @@
"description": "A jQuery plugin to add balloon tips to elements. User-friendly, fine-tunable and without css and images.",
"keywords": [
"balloon",
"tip"
],
"version": "0.4.0",
"tip"
],
"version": "0.4.1",
"author": {
"name": "urin",
"url": "https://github.com/urin"
},
"maintainers": [
{
"name": "urin",
"email": "urinkun@gmail.com",
"url": "https://github.com/urin"
}
{
"name": "urin",
"email": "urinkun@gmail.com",
"url": "https://github.com/urin"
}
],
"licenses": [
"licenses": [
{
"type": "MIT",
"url": "http://www.opensource.org/licenses/mit-license.php"
Expand All @@ -28,11 +28,11 @@
"url": "http://www.gnu.org/licenses/gpl.html"
}
],
"bugs": "https://github.com/urin/jquery.balloon.js/issues",
"homepage": "https://github.com/urin/jquery.balloon.js",
"docs": "http://urin.github.com/jquery.balloon.js",
"download": "https://raw.github.com/urin/jquery.balloon.js/master/jquery.balloon.js",
"dependencies": {
"jquery": ">=1.4.2"
}
"bugs": "https://github.com/urin/jquery.balloon.js/issues",
"homepage": "https://github.com/urin/jquery.balloon.js",
"docs": "http://urin.github.com/jquery.balloon.js",
"download": "https://raw.github.com/urin/jquery.balloon.js/master/jquery.balloon.js",
"dependencies": {
"jquery": ">=1.4.2"
}
}
9 changes: 6 additions & 3 deletions jquery.balloon.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* http://www.opensource.org/licenses/mit-license.php
* http://www.gnu.org/licenses/gpl.html
* @author: Hayato Takenaka (http://urin.github.com)
* @version: 0.4.0 - 2014/02/09
* @version: 0.4.1 - 2014/02/09
**/
(function($) {
//-----------------------------------------------------------------------------
Expand Down Expand Up @@ -177,6 +177,9 @@
$balloon.mouseleave(function(e) {
if(t === e.relatedTarget || $.contains(t, e.relatedTarget)) return;
$target.hideBalloon();
}).mouseenter(function(e) {
$balloon.stop(true, true);
$target.showBalloon();
});
}
}).mouseleave(function(e) {
Expand All @@ -188,7 +191,7 @@
$.fn.showBalloon = function(options) {
var $target, $balloon, offTimer;
if(options || !this.data("options")) {
if($.balloon.defaults.css == null) $.balloon.defaults.css = {};
if($.balloon.defaults.css === null) $.balloon.defaults.css = {};
this.data("options", $.extend(true, {}, $.balloon.defaults, options || {}));
}
options = this.data("options");
Expand All @@ -212,7 +215,7 @@
if(isNew) {
$balloon
.addClass(options.classname)
.css(options.css)
.css(options.css || {})
.css({visibility: "hidden", position: "absolute"})
.appendTo("body");
$target.data("balloon", $balloon);
Expand Down
2 changes: 1 addition & 1 deletion jquery.balloon.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 3c9d2b3

Please sign in to comment.