Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/bootstrap.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Thornton <jacobthornton@gmail.com>2012-04-15 03:29:53 +0400
committerJacob Thornton <jacobthornton@gmail.com>2012-04-15 03:29:53 +0400
commit575f18aaf49abb0289185f6409bee031947ccf69 (patch)
treed3548124fab9ba1affe9e056665a46a20432a5c7 /docs/assets/js/bootstrap-tooltip.js
parent8575a452942001bce522e8e258d9e192d24cb6ec (diff)
add jshint support + a few minor stylistic changes
Diffstat (limited to 'docs/assets/js/bootstrap-tooltip.js')
-rw-r--r--docs/assets/js/bootstrap-tooltip.js25
1 files changed, 13 insertions, 12 deletions
diff --git a/docs/assets/js/bootstrap-tooltip.js b/docs/assets/js/bootstrap-tooltip.js
index 2f9254ed2a..454e7a4484 100644
--- a/docs/assets/js/bootstrap-tooltip.js
+++ b/docs/assets/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: '<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>'
, trigger: 'hover'
, title: ''
- , template: '<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>'
+ , delay: 0
}
-}( window.jQuery ); \ No newline at end of file
+}(window.jQuery); \ No newline at end of file