click handler fired twice
  • I have following issue:
    $(document).ready(function() {
    $('input[type=checkbox],input[type=radio]').prettyCheckboxes();

    $('#compareWrapper input[type=checkbox]').click(function() {
    var guid = $(this).attr('value');

    if ($(this).is(':checked')) {
    AssertMethod(guid);
    } else {
    AssertMethod(guid);
    }
    });
    });

    For some reason the onclick is firing twice. (first time checked = the state from before click)

    Any ideas?
    Bart
  • Yes, you can see this on the demo page too.

    When I click the first checkbox I get the alert box telling me that it fired, I click OK, then I get a second alert box telling me the same thing.

    In Safari so far- I have not checked this on other browsers.
  • I've got the same behaviour and I have to find how to change this... Anyone since January did find a solution ? Sincerely
  • I gave up. This other plugin will allow you to draw your own checkbox and radio button sprites. It's a very simple process that uses the entire "label" area as a trigger to change the image...

    http://www.filamentgroup.com/lab/accessible_custom_designed_checkbox_radio_button_inputs_styled_css_jquery/
  • Hi there!
    I know it has been two year since the last reply, but i'm forced to deal with this plugin and found a temp solution for this problem: just comment the piece of code that fires up the second trigger.

    It looks that this project is abandoned, but for those who have to support a project that uses this plugin:

    - On your jquery.checkboxes.js file, find this part:

    $("input#"+$(this).attr("for")).triggerHandler("click");

    and replace it for:

    /* $("input#"+$(this).attr("for")).triggerHandler("click"); */

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Login with Facebook Sign In with Google Sign In with OpenID Sign In with Twitter