forked from brandonaaron/jquery-cssHooks
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathborderimage.js
executable file
·40 lines (27 loc) · 1004 Bytes
/
borderimage.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
33
34
35
36
37
38
39
40
/*! Copyright (c) 2010 Tom Ellis (http://www.webmuse.co.uk)
* Licensed under the MIT License (LICENSE.txt).
*/
(function($) {
// Border Image set and get hooks
if( !$.cssHooks )
{
$.error( "jQuery 1.4.3+ is needed for this plugin to work" );
}
var div = document.createElement( "div" );
$.support.borderImage =
div.style.MozBorderImage === '' ? 'MozBorderImage' :
(div.style.WebkitBorderImage === '' ? 'WebkitBorderImage' :
(div.style.borderImage === '' ? 'borderImage' : false));
if ( $.support.borderImage && $.support.borderImage !== "borderImage" )
{
$.cssHooks.borderImage = {
get: function( elem, computed, extra ) {
return $.css(elem, $.support.borderImage);
},
set: function( elem, value ) {
elem.style[$.support.borderImage] = value;
}
};
}
div = null;
})(jQuery);