jquery ui slider with rounded corners - older borwser issues (.corner)
I'm using this library to apply corners to a jquery ui slider element - https://gi开发者_如何学Gothub.com/malsup/corner
You can see a working example here - http://jsfiddle.net/FtkRQ/3/
I've applied the corners using css3 for modern browsers and am using the aforementioned jquery plugin for older browsers.
If you look at the slider's handles in ie7 you'll see I'm having an issue with the background colour.
Any idea why?
The plugin sets the border to the color of the first parent element that has it set, here is the plugin code,
function gpc(node) {
while(node) {
var v = $.css(node,'backgroundColor'), rgb;
if (v && v != 'transparent' && v != 'rgba(0, 0, 0, 0)') {
if (v.indexOf('rgb') >= 0) {
rgb = v.match(/\d+/g);
return '#'+ hex2(rgb[0]) + hex2(rgb[1]) + hex2(rgb[2]);
}
return v;
}
if (node.nodeName.toLowerCase() == 'html')
break;
node = node.parentNode; // keep walking if transparent
}
return '#ffffff';
};
The plugin just creates a bunch of 1px high spans and varies the border width and sets a color. There doesn't seem to be a way to use transparent borders.
So it is not possible to use a transparent background for the cornering, sorry.
精彩评论