[jQuery] Suggestion for corner plugin to get lighter DOM

[jQuery] Suggestion for corner plugin to get lighter DOM


I'm a great fan of the corner plugin, but I came across a possible
weakness using the top/bottom setting.
If I specify that I want to use corners for only the top or bottom
halv of my container, the plugin will still add DOM elements for the
other half. This is in most cases invisible, but in IE6/IE7 it will
cause a side effect in certain cases, as it shifts divs two pixels,
causing underlying background color to become visible.
Manipulating the bottom of a div seems unnecessary when I just need
corners on the top.
I added a check that will prevent this behaviour. It just checks if
it's really neccesary to create the additional DOM for the current
edge:
for (var j in edges) {
var bot = edges[j];
-------------- inserted: --------------
if ( (bot && (opts.BL || opts.BR)) || (!bot && (opts.TR ||
opts.TR)) ) {
--------------- /inserted -------------
// existing code that adds div elements
-------------- inserted: --------------
}
--------------- /inserted -------------
}
I presume the corner authors also scan this list, but I'm unsure who
maintains the "official" version. It'd be great if you could consider
adding this into the plugin, so that I don't have to use an edited
version of this great tool!