malsup / corner

jQuery Corner Plugin (by Dave Methvin and Mike Alsup)
http://jquery.malsup.com/corner/
543 stars 109 forks source link

try to make corner in non-div elements breaks script execution in IE8 (maybe older versions too) #33

Closed ghost closed 11 years ago

ghost commented 14 years ago

Hello!

If you try to make a corner in an element other than div, using IE8, the execute of the script stops. It occurs in line 157 of the jquery.corner.js script.

I've added a try...catch block to solve it, but I do'nt know if we can do it by some "best way".

Here what I changed: At line 157:

bot ? this.appendChild(d) : this.insertBefore(d, this.firstChild);

changed to:

try { bot ? this.appendChild(d) : this.insertBefore(d, this.firstChild); } catch(e) { /* do nothing */ }

That's all ;D Thank you!

bhavik4it commented 11 years ago

Facing the Same error, any solution?

malsup commented 11 years ago

Cornering elements that can't have children, such as inputs, is not supported by the plugin.