[jQuery] Rounded and beveled corners
Okay, here's my first shot at rounded corners. I also added the ability to
do beveled corners since it basically came for free if I did it the dumb
way:
http://methvin.com/jquery/jq-corner-demo.html
I think the bevel case can be done much more efficiently (using fewer
inserted elements) with "css border slants", but it was going to take a
while to get all the code right, especially in IE. I must say, this is the
first time I can recall having a need for trig functions in Javascript.
I want this to handle more "corner cases" (snicker) such as notched or
folded corners, and also to allow for borders on the divs that are being
cornered. The input argument accepts some of these names already but treats
them like a bevel. Looking at my upcoming schedule, I think this is about as
far as I can get for a while.
The plugin is here, feel free to abuse or enhance it. I tested with IE6, IE7
beta, and Firefox 1.5 on XP, so I don't know what it does on a Mac. Bug
reports appreciated--bug fixes greatly appreciated!
http://methvin.com/jquery/jq-corner.js
_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/