Elements Rounded on Page Load
The most common way to round the corners of an element is on pageload. You may use the pageload() method to add elements for rounding on page load:
roundedcornerspaneljs.pageload({
rootfolder: "",
element: "Div1",
size: "large",
dithercolor: "#9e9e9e",
roundedcorners: "true, true, true, true"
});
All Corners Rounded
Welcome to Rounded Corner Panel.JS
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Top Left Corner Not Rounded
Welcome to Rounded Corner Panel.JS
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Top Right Corner Not Rounded
Welcome to Rounded Corner Panel.JS
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Bottom Right Corner Not Rounded
Welcome to Rounded Corner Panel.JS
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Bottom Left Corner Not Rounded
Welcome to Rounded Corner Panel.JS
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
No Rounded Corners
Welcome to Rounded Corner Panel.JS
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Three Different Sizes of Rounded Corners
The size property of the methods of Rounded Corners Panel.JS allows to set three different size for the rounded corners of the panel that is manipulated - small, medium and large:
small
Welcome to Rounded Corner Panel.JS
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
medium
Welcome to Rounded Corner Panel.JS
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
large
Welcome to Rounded Corner Panel.JS
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Exclude Corners from Rounding
The roundedcorners property of the script are four Boolean properties. If set to "false", the selected corner will be excluded from rounding.
Specifying a Dither Color for the Rounded Corners
The dithercolor property allows the setting of a dithering color to the corners of the rendered panel so they looks smooth at the background color of their parent or the body of the page
Mehtods of Rounded Corners Panel.JS
Initialize on Page Load
The most common way to round the corners of an element is on pageload. You may use the pageload() to add elements for rounding on page load:
roundedcornerspaneljs.pageload({
rootfolder: "",
element: "Div10",
size: "large",
dithercolor: "#9e9e9e",
roundedcorners: "true, true, true, true"
});
Welcome to Rounded Corner Panel.JS 3.0
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Initialize on Demand
The demand() method of Rounded Corners Panel.JS allows to round an element upon user action, for example on click:
roundedcornerspaneljs.demand({
rootfolder: "",
element: "Div11",
size: "large",
dithercolor: "#9e9e9e",
roundedcorners: "true, true, true, true"
});
click here to round the element below
Welcome to Rounded Corner Panel.JS 3.0
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Troubleshooting
Older versions of Opera do not implement named color values of the method in JavaScript, so in order to make it work correctly, use hex color values for the background of the elements you style with rounded corners.
Browser Support
- Internet Explorer 6
- Internet Explorer 7
- Internet Explorer 8
- Mozilla FireFox
- Opera
- Google Chrome
- Apple afari