activate round corners on individuall corners

i see that are people who want some corners to not get rounded

i modified the js file to do that and it works, here is what you need to change in the shadedborder.js

around line 36 you have:
var sr = opts.shadow || 0;
var r = opts.corner || 0;

add the folowing after those 2 lines
var rtlc = opts.tlc==undefined?1:opts.tlc;//top left corner
var rtrc = opts.trc==undefined?1:opts.trc;//top rightcorner
var rblc = opts.blc==undefined?1:opts.blc;//bottom left corner
var rbrc = opts.brc==undefined?1:opts.brc;//bottom left corner

also around line 50 you have:
var cx = r != 0 && shadow ? Math.round(lw/3) : 0;
you can change to var cx = 0; to make the shadow simetric up-down

first line in the function corner(el,t,l){ add this
valid=(t&&l&&rtlc)||(t&&!l&&rtrc)||(!t&&l&&rblc)||(!t&&!l&&rbrc);

also around line 120 you will have

if (xc < 0 && yc < r || yc < 0 && xc < r){
as condition for finish() function

modify that with

if ((yc < r && xc < r && !valid)||(valid &&(xc < 0 && yc < r || yc < 0 && xc < r))) {

one more tip: do not use padding on a rounded div and some update js code(modifying style elements) after that on one of it childs, IE7 will remove some background at the bottom of the div(right on top of the bottom corners). the removed background and shadow will have the same height as the padding number

Trackback URL for this post:

http://www.ruzee.com/trackback/253

How to implement this... for top left and bottom right rounded.

I've been trying to figure out how to use this script to only do the top left and bottom right corners, or the top right and bottom left... But none of the mods in this forum seem to help in that situation... unless I'm implementing something wrong...

There isn't any directions for implementing this modification... please please could you provide some directions?

How would you implement this

How would you implement this on the page?
For example I have a div which I want all 4 corners rounded, followed by another where I want only the bottom 2 corners rounded.

How would this code look?