Permalink
Browse files

Fixed two click event bugs and better minification with UglifyJS

  • Loading branch information...
1 parent 0b59939 commit 96b7a5e955db2198d82421939b74eeaa52de05e0 @goldfire committed Jul 1, 2012
Showing with 19 additions and 14 deletions.
  1. +6 −1 README.md
  2. +8 −8 jquery.miniTip.js
  3. +3 −3 jquery.miniTip.min.js
  4. +1 −1 miniTip.css
  5. +1 −1 miniTip.min.css
View
@@ -1,4 +1,4 @@
-jQuery miniTip Plugin (v1.5.0)
+jQuery miniTip Plugin (v1.5.1)
---------------------
License
@@ -67,6 +67,11 @@ Requirements
Changelog
============
+### Version 1.5.1 (June 30, 2012) ###
+* Switched to UglifyJS for minified version.
+* Fixed issue that added multiple click events to the html element.
+* Call the hide custom function on the correct tooltip when multiple miniTips are used on the same page.
+
### Version 1.5.0 (December 9, 2011) ###
* Fix image map compatibility for Firefox and Opera.
* Allow show() callback to access options and element context for dynamically overriding content (Wolfram Arnold).
View
@@ -1,7 +1,7 @@
/*!
- * miniTip v1.5.0
+ * miniTip v1.5.1
*
- * Updated: December 9, 2011
+ * Updated: June 30, 2012
* Requires: jQuery v1.3+
*
* (c) 2011, James Simpson
@@ -14,7 +14,7 @@
*/
(function($){
- $.fn.miniTip = function(opts) {
+ $.fn.miniTip = function(opts) {
// declare the default option values
var d = {
title: '', // if left blank, no title bar will show
@@ -118,13 +118,13 @@
tt_w.data('last_target', el);
+ // clear the tooltip if anywhere but the tooltip itself is clicked
+ $('html').unbind('click').click(function(e){
+ if (tt_w.css('display') == 'block' && !$(e.target).closest('#miniTip').length) hide();
+ });
+
return false;
});
-
- // clear the tooltip if anywhere but the tooltip itself is clicked
- $('html').click(function(e){
- if (tt_w.css('display') == 'block' && !$(e.target).closest('#miniTip').length) hide();
- });
}
// show the tooltip
View

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
View
@@ -1,4 +1,4 @@
-/*! miniTip CSS - v1.5.0 */
+/*! miniTip CSS - v1.5.1 */
#miniTip {
/* main styles for tooltip */
View

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

0 comments on commit 96b7a5e

Please sign in to comment.