From 575f18aaf49abb0289185f6409bee031947ccf69 Mon Sep 17 00:00:00 2001 From: Jacob Thornton Date: Sat, 14 Apr 2012 16:29:53 -0700 Subject: add jshint support + a few minor stylistic changes --- js/bootstrap-tooltip.js | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) (limited to 'js/bootstrap-tooltip.js') diff --git a/js/bootstrap-tooltip.js b/js/bootstrap-tooltip.js index 2f9254ed2..454e7a448 100644 --- a/js/bootstrap-tooltip.js +++ b/js/bootstrap-tooltip.js @@ -19,14 +19,15 @@ * ========================================================== */ -!function ( $ ) { +!function ($) { + + "use strict"; // jshint ;_; - "use strict" /* TOOLTIP PUBLIC CLASS DEFINITION * =============================== */ - var Tooltip = function ( element, options ) { + var Tooltip = function (element, options) { this.init('tooltip', element, options) } @@ -34,7 +35,7 @@ constructor: Tooltip - , init: function ( type, element, options ) { + , init: function (type, element, options) { var eventIn , eventOut @@ -55,7 +56,7 @@ this.fixTitle() } - , getOptions: function ( options ) { + , getOptions: function (options) { options = $.extend({}, $.fn[this.type].defaults, options, this.$element.data()) if (options.delay && typeof options.delay == 'number') { @@ -68,7 +69,7 @@ return options } - , enter: function ( e ) { + , enter: function (e) { var self = $(e.currentTarget)[this.type](this._options).data(this.type) if (!self.options.delay || !self.options.delay.show) { @@ -84,7 +85,7 @@ } } - , leave: function ( e ) { + , leave: function (e) { var self = $(e.currentTarget)[this.type](this._options).data(this.type) if (!self.options.delay || !self.options.delay.hide) { @@ -155,7 +156,7 @@ } } - , isHTML: function( text ) { + , isHTML: function(text) { // html string detection logic adapted from jQuery return typeof text != 'string' || ( text.charAt(0) === "<" @@ -271,12 +272,12 @@ $.fn.tooltip.defaults = { animation: true - , delay: 0 - , selector: false , placement: 'top' + , selector: false + , template: '
' , trigger: 'hover' , title: '' - , template: '
' + , delay: 0 } -}( window.jQuery ); \ No newline at end of file +}(window.jQuery); \ No newline at end of file -- cgit v1.2.3