>> Paul, nice implementation of nifty inside of jquery. Out of curiosity, 
>> does nifty do rounded corners any differently then Dave's plugin?
>>
>> http://methvin.com/jquery/jq-corner-demo.html
>
> Dave's does have less code involved, doesn't use the GPL (not sure
> if a dual license is possible as it is based on someone elses code)
> and has no need of extra CSS in the stylesheet. However, Paul's
> could be handy for those already familiar with Nifty.

I took a look at Nifty when building my version, and most of what I left out
compared to Nifty was intentional. Having an external stylesheet complicates
the package and usage; it was easier to set the style manually and then
clone the correctly styled node. The other features like same-height seem
like they belonged in a separate plugin since they weren't related to
rounding corners and could be used in other situations. I seem to recall
someone already posted a same-height plugin here recently.

One of the reasons that I named the method .corner() was because there is no
limit on the corner shape. There is a simple way to define corner-shape
plugin functions built into the code. The original release had the beveled
corner, but I had worked on some other shapes as well. A while back, Mike
Alsup enhanced the cornering capabilities significantly. If you are looking
for some design flair for your page, these look a lot nicer than plain old
rounding!

http://malsup.com/jquery/corner

Something that neither Nifty nor .corner() do is handle bordered elements.
It turns out to be very difficult to do; I spent several nights playing
around with the code and wasn't happy with the outcome. It can be done, at
least for the rounded corners case, and Ruzee Borders does a pretty good job
of it:

http://www.ruzee.com/blog/ruzeeborders/

I started on a similar implementation in jQuery but it seemed too complex
from the amount of code it required, the effects on the CSS cascade, and the
number of DOM elements it had to insert to get an acceptably good
appearance. The corner shape plugins became significantly tougher to write
as well. For now I've shelved it, but I'll be glad to pass along the code to
anyone who would like to tackle it.


_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/

Reply via email to