ScrewDefaultButtons plugin and “Uncaught RangeError: Maximum call stack size exceeded”

I was using a lot of plugins which can make my life easier when Im dealing with inputs especially checkboxes and radio buttons. One of the best plugins which Im been using is ScrewDefaultButtons.

Ive started with this one:

  <label for="ch01">Lorem ipsum dolor</label>
  <input type="checkbox" id="ch01">

When the plugin was invoked on this element with code:

$('.product_filters input[type="checkbox"]').screwDefaultButtons({
    image: 'url("checkbox_sprite.png")',
    width: 15,
    height: 15

The element label is inactive. This means that you can cannot change a value of checkbox described as a for attribute clicking on label. So Ive changed structure a little bit:

Uncaught RangeError: Maximum call stack size exceeded

The problem was resolved with simple solution – removing the for attribute in label.

  <label>Lorem ipsum dolor
    <input type="checkbox" id="ch01"/>

Leave a Reply

Your email address will not be published. Required fields are marked *