I have inline script such as this, which toggles between an edit and a display divs. If it is inside the the UpdatePanel it requires two click before it works. If I remove the UpdatePanel it works fine with a single click.
<a href="#" onclick="edit(event,'ctl00_CPH1_ctl00_win1')">Edit</a>
Can anyone help please?
Thanks
EDIT: Edit function:
function edit(e, id) {
    var editdiv = $('#' + id).find('.edit');
    var cntdiv = $('#' + id).find('.content');
    if (editdiv.css('visibility') == 'hidden') {
        editdiv.css('visibility') == 'visible'
        cntdiv.css('visibility') == 'hidden'
        cntdiv.hide();
        editbox.show()
    }
    else {
        editdiv.css('visibility') == 'hidden'
        cntdiv.css('visibility') == 'visible'
        cntbox.show();
        editbox.hide()
    }
    stopEventBubble(e); // Code to cancel event bubbling;
}