forked from brandonaaron/jquery-cssHooks
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathboxreflect.js
executable file
·32 lines (28 loc) · 908 Bytes
/
boxreflect.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
/*!
* Copyright (c) 2011 Tom Ellis (http://www.webmuse.co.uk)
* Box Reflect cssHook for jQuery
* Limitations:
- Works with jQuery 1.4.3 and higher
- Doesn't currently support gradients
* Licensed under the MIT License (LICENSE.txt).
*/
(function($) {
var div = document.createElement('div'),
divStyle = div.style;
$.support.boxReflect =
divStyle.boxReflect === '' ? 'boxReflect' :
(divStyle.MozBoxReflect === '' ? 'MozBoxReflect' :
(divStyle.WebkitBoxReflect === '' ? 'WebkitBoxReflect' :
(divStyle.OBoxReflect === '' ? 'OBoxReflect' : false)));
if ( $.support.boxReflect && $.support.boxReflect !== 'boxReflect' ) {
$.cssHooks.boxReflect = {
get: function( elem, computed, extra ) {
return $.css( elem, $.support.boxReflect );
},
set: function( elem, value ) {
elem.style[$.support.boxReflect] = value;
}
};
}
div = divStyle = null;
})(jQuery);