Problem with Jquery Corner plugin at firefox 4 ?

If your jquery.corner.js is not working with firefox 4 then a small modification of your plugin can make it OK for firefox 4.

Open your jquery.corner.js file. At the beginning of the code you will find some code like

var style = document.createElement('div').style;
var moz = style['MozBorderRadius'] !== undefined;
var webkit = style['WebkitBorderRadius'] !== undefined;
var radius = style['BorderRadius'] !== undefined;

In this plugin,

var moz = style['MozBorderRadius'] !== undefined;

was actually for firefox. But from firefox 4 there is no longer exists -moz-radius, that means style[‘MozBorderRadius’] will not work for firemox 4 anymore.

For firefox 4, they use the standard “border-radius” for curve corner of an element. So change the line

var radius = style['BorderRadius'] !== undefined;

to

var radius = (style['BorderRadius'] || style['borderRadius']) !== undefined;

This change of  jquery.corner.js plugin will work for both old firefox version as well as Firefox 4.

cheers!

Advertisements

One thought on “Problem with Jquery Corner plugin at firefox 4 ?

  1. Thank you men. I was looking for what is the problem with a new proyect i’m workink and firefox 4.
    I was driving crazy.
    Thank you

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s