*.dannyg

Curvycorners.js with jQuery

Feb
26

Curvycorners.js is a great library that can add curvycorners to DOM elements.  A lot of older browsers don’t support the CSS3 property to add “radius” to make them rounded (amongst other properties).

I thought it might useful to be able to use curvycorners with jQuery.  Here is a very simple example of this.  Enjoy!

 

$(function () {
    var settings = {
        tl: { radius: 10 },
        tr: { radius: 10 },
        antiAlias: true
    }
 
    var divObj = $(".main");
    for (var i = 0; i < divObj.length; i++) {
        curvyCorners(settings, divObj[i]);
    }
});

jQuery is bundled w/VS2010

Feb
03

Both webforms and MVC have jquery 1.4.1 in the Scripts folder by default.

image

Technorati Tags: ,,