jQuery GCorners is a small jQuery plugin that uses PHP to dynamically create a PNG circle image and Google style CSS to give your elements rounded corners. To use the plugin all you need to do is:
<script type="text/javascript" src="scripts/jquery.js"></script>
<script type="text/javascript" src="scripts/jquery.gcorners.js"></script>
<script type="text/javascript">
$(document).ready(function(){
//Example 1: Defaults to 10px x 10px with color black
$('#content1').gcorners();
//Example 2: Set width and color. Height is default.
$('#content2').gcorners({ width:30, color:'00BF85'});
//Example 3: Set height, width and color.
$('#content3').gcorners({ height:50, width:40, color:'0AAA85'});
});
</script>
This plugin generates valid XHTML and CSS code and is compatible with:
- IE 7+
- Firefox v3+
- Chrome v1+
- (Other Browsers Untested)
Note: You will need PHP to be able to run this script as it relies on a PHP script to generate images.
You can read documentation and get your hands on the source over at the Google Code project.
Does not work with my IE8 and Opera 10. Testing on this site.
Also does not work with my IE6 and IE8 PCs. Haven’t tried IE7.