Skip to content
This repository has been archived by the owner on Jun 14, 2020. It is now read-only.

Commit

Permalink
Add new events.hidden event to compliment event.visible
Browse files Browse the repository at this point in the history
  • Loading branch information
Craga89 committed Apr 2, 2012
1 parent 3ec5cd8 commit eca86a1
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 22 deletions.
2 changes: 1 addition & 1 deletion dist/comment
@@ -1 +1 @@
Add missing files and make sure to only use first element of a jquery object passed to position.container
Fixed tooltip not showing bug.
13 changes: 7 additions & 6 deletions dist/jquery.qtip.basic.js
Expand Up @@ -9,7 +9,7 @@
* http://en.wikipedia.org/wiki/MIT_License
* http://en.wikipedia.org/wiki/GNU_General_Public_License
*
* Date: Sat Mar 31 19:36:54 2012 +0100
* Date: Mon Apr 2 21:24:16 2012 +0100
*/

/*jslint browser: true, onevar: true, undef: true, nomen: true, bitwise: true, regexp: true, newcap: true, immed: true, strict: true */
Expand Down Expand Up @@ -1045,11 +1045,6 @@ function QTip(target, options, id, attr)
$(opts.autofocus, tooltip).focus();
}

// Call API method
callback = $.Event('tooltipvisible');
callback.originalEvent = event ? cache.event : NULL;
tooltip.trigger(callback, [self]);

// If set, hide tooltip when inactive for delay period
opts.target.trigger('qtip-'+id+'-inactive');
}
Expand All @@ -1063,6 +1058,11 @@ function QTip(target, options, id, attr)
top: ''
});
}

// Call API method
callback = $.Event('tooltip'+(state ? 'visible' : 'hidden'));
callback.originalEvent = event ? cache.event : NULL;
tooltip.trigger(callback, [self]);
}

// Clear/stop animation
Expand Down Expand Up @@ -1984,6 +1984,7 @@ QTIP.defaults = {
hide: NULL,
toggle: NULL,
visible: NULL,
hidden: NULL,
focus: NULL,
blur: NULL
}
Expand Down
2 changes: 1 addition & 1 deletion dist/jquery.qtip.css
Expand Up @@ -9,7 +9,7 @@
* http://en.wikipedia.org/wiki/MIT_License
* http://en.wikipedia.org/wiki/GNU_General_Public_License
*
* Date: Sat Mar 31 19:36:54 2012 +0100
* Date: Mon Apr 2 21:24:16 2012 +0100
*/

/* Core qTip styles */
Expand Down
13 changes: 7 additions & 6 deletions dist/jquery.qtip.js
Expand Up @@ -9,7 +9,7 @@
* http://en.wikipedia.org/wiki/MIT_License
* http://en.wikipedia.org/wiki/GNU_General_Public_License
*
* Date: Sat Mar 31 19:36:54 2012 +0100
* Date: Mon Apr 2 21:24:16 2012 +0100
*/

/*jslint browser: true, onevar: true, undef: true, nomen: true, bitwise: true, regexp: true, newcap: true, immed: true, strict: true */
Expand Down Expand Up @@ -1045,11 +1045,6 @@ function QTip(target, options, id, attr)
$(opts.autofocus, tooltip).focus();
}

// Call API method
callback = $.Event('tooltipvisible');
callback.originalEvent = event ? cache.event : NULL;
tooltip.trigger(callback, [self]);

// If set, hide tooltip when inactive for delay period
opts.target.trigger('qtip-'+id+'-inactive');
}
Expand All @@ -1063,6 +1058,11 @@ function QTip(target, options, id, attr)
top: ''
});
}

// Call API method
callback = $.Event('tooltip'+(state ? 'visible' : 'hidden'));
callback.originalEvent = event ? cache.event : NULL;
tooltip.trigger(callback, [self]);
}

// Clear/stop animation
Expand Down Expand Up @@ -1984,6 +1984,7 @@ QTIP.defaults = {
hide: NULL,
toggle: NULL,
visible: NULL,
hidden: NULL,
focus: NULL,
blur: NULL
}
Expand Down
6 changes: 3 additions & 3 deletions dist/jquery.qtip.min.js

Large diffs are not rendered by default.

11 changes: 6 additions & 5 deletions src/core.js
Expand Up @@ -973,11 +973,6 @@ function QTip(target, options, id, attr)
$(opts.autofocus, tooltip).focus();
}

// Call API method
callback = $.Event('tooltipvisible');
callback.originalEvent = event ? cache.event : NULL;
tooltip.trigger(callback, [self]);

// If set, hide tooltip when inactive for delay period
opts.target.trigger('qtip-'+id+'-inactive');
}
Expand All @@ -991,6 +986,11 @@ function QTip(target, options, id, attr)
top: ''
});
}

// Call API method
callback = $.Event('tooltip'+(state ? 'visible' : 'hidden'));
callback.originalEvent = event ? cache.event : NULL;
tooltip.trigger(callback, [self]);
}

// Clear/stop animation
Expand Down Expand Up @@ -1912,6 +1912,7 @@ QTIP.defaults = {
hide: NULL,
toggle: NULL,
visible: NULL,
hidden: NULL,
focus: NULL,
blur: NULL
}
Expand Down

0 comments on commit eca86a1

Please sign in to comment.