]> git.ipfire.org Git - thirdparty/foundation/foundation-sites.git/commitdiff
firing toggle_checkbox and toggle_radio when clicking on custom radio/checkbox elemen...
authorMark Hayes <mark@zurb.com>
Fri, 8 Mar 2013 00:01:11 +0000 (16:01 -0800)
committerMark Hayes <mark@zurb.com>
Fri, 8 Mar 2013 00:01:11 +0000 (16:01 -0800)
js/foundation/foundation.forms.js

index a8cd456898691ec42ac518cae568b5706890ef7c..43bf4515d2b996cd6669a23122816ea6131a2e6d 100644 (file)
       var self = this;
 
       $(this.scope)
-        .on('click.fndtn.forms', 'form.custom span.custom.checkbox', function (e) {
-          e.preventDefault();
-          e.stopPropagation();
-          self.toggle_checkbox($(this));
-        })
-        .on('click.fndtn.forms', 'form.custom span.custom.radio', function (e) {
-          e.preventDefault();
-          e.stopPropagation();
-          self.toggle_radio($(this));
-        })
         .on('change.fndtn.forms', 'form.custom select:not([data-customforms="disabled"])', function (e) {
           self.refresh_custom_select($(this));
         })
@@ -66,6 +56,7 @@
             if ($associatedElement.attr('type') === 'checkbox') {
               e.preventDefault();
               $customCheckbox = $(this).find('span.custom.checkbox');
+
               //the checkbox might be outside after the label
               if ($customCheckbox.length == 0) {
                 $customCheckbox = $(this).next('span.custom.checkbox');