Skip to content

Commit 6ec8fae

Browse files
committed
Added Check for css3 animation
Added Check for css3 animation
1 parent 56f839c commit 6ec8fae

File tree

5 files changed

+17
-14
lines changed

5 files changed

+17
-14
lines changed

bower.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "tipso",
3-
"version": "1.0.2",
3+
"version": "1.0.4",
44
"description": "A Lightweight Responsive jQuery Tooltip Plugin",
55
"main": ["src/tipso.min.js", "src/tipso.css"],
66
"keywords": [

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"mobile",
1111
"lightweight"
1212
],
13-
"version": "1.0.3",
13+
"version": "1.0.4",
1414
"author": "Bojan Petkovski (http://object505.com/)",
1515
"licenses": [
1616
{

src/tipso.js

+12-9
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* tipso - A Lightweight Responsive jQuery Tooltip Plugin v1.0.2
2+
* tipso - A Lightweight Responsive jQuery Tooltip Plugin v1.0.4
33
* Copyright (c) 2014-2015 Bojan Petkovski
44
* http://tipso.object505.com
55
* Licensed under the MIT license
@@ -34,10 +34,8 @@
3434
this._title = this.element.attr('title');
3535
this.mode = 'hide';
3636
this.ieFade = false;
37-
if ( _isIE() ) {
38-
if ( _isIE() <= 9 ) {
39-
this.ieFade = true;
40-
}
37+
if ( !supportsTransitions ) {
38+
this.ieFade = true;
4139
}
4240
this.init();
4341
}
@@ -202,10 +200,15 @@
202200
return height;
203201
}
204202

205-
var _isIE = function () {
206-
var ua = navigator.userAgent.toLowerCase();
207-
return (ua.indexOf('msie') != -1) ? parseInt(ua.split('msie')[1]) : false;
208-
};
203+
var supportsTransitions = (function() {
204+
var s = document.createElement('p').style,
205+
v = ['ms','O','Moz','Webkit'];
206+
if( s['transition'] == '' ) return true;
207+
while( v.length )
208+
if( v.pop() + 'Transition' in s )
209+
return true;
210+
return false;
211+
})();
209212

210213
function reposition(thisthat) {
211214
var tipso_bubble = thisthat.tooltip(),

src/tipso.min.js

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tipso.jquery.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"mobile",
1111
"lightweight"
1212
],
13-
"version": "1.0.2",
13+
"version": "1.0.4",
1414
"author": {
1515
"name": "Bojan Petkovski",
1616
"url": "http://object505.com"

0 commit comments

Comments
 (0)