Redrawing rounded corners when using curvycorners-plugin for jQuery.

Posted by timkl on Stack Overflow See other posts from Stack Overflow or by timkl
Published on 2010-03-19T12:59:43Z Indexed on 2010/03/19 13:01 UTC
Read the original article Hit count: 734

Filed under:
|

I'm using the curvycorners jQuery plugin (http://www.curvycorners.net/instructions/) to force IE to render rounded corners on divs.

It works really well, apart from one thing: I have a validation error-message that pops up inside the div, using jQuery's "show" method.

Curvycorners adds an extra div that is absolute positioned and has a set height, this means that you have to redraw the rounded corners if you want the containing div to resize when the error-message is shown.

Curvycorners include a functions you can call to redraw the rounded corners, however it doesn't execute when I put it inside this click-function:

$("input[type='submit']").click(function(e) {
curvyCorners.redraw();
});

This is my markup:

<fieldset class="curvyRedraw">      

<legend>Some legend</legend>

<form id="someForm">

<div id="error-message"></div>

<div class="buttons">
    <input type="submit" id="cancel" value="Cancel" name="action" />
    <input type="submit" id="submit" value="Confirm" name="action" />
</div>

</form>

</fieldset>

Anyone had similar issues?

© Stack Overflow or respective owner

Related posts about curvycorners

Related posts about jQuery