I’m using jQuery corner plugin for border-radius cross-browser support.
This is my function:
if(!Modernizr.borderradius){
var s = document.styleSheets;
for(var i = 0; i<s.length;i++){
var r = s[i].rules || s[i].cssRules;
for(var x=0;x<r.length;x++) {
var t = r[x].cssText || r[x].style.cssText;
if(t.search("radius")>0) $(r[x].selectorText).corner();
}
}
}
Basically, i’m retrieving any element who has border-radius set.
I need a better regex, like this one:
border(-)?(top|bottom)?(-)?(left|right)?-radius:(.+?);
to detect any variation of border-radius and retrieve its value. Thanks a lot
I think you’re looking for…