Browse files

Merge pull request #1159 from vitoravelino/master

toggleRadio must only search for inputs in $input's form, not all over the DOM
  • Loading branch information...
2 parents 65e2765 + 61066c5 commit ac4ddb66e3ce6a35d803be4819a21b37737703a8 @mhayes mhayes committed Nov 10, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 vendor/assets/javascripts/foundation/jquery.foundation.forms.js
View
4 vendor/assets/javascripts/foundation/jquery.foundation.forms.js
@@ -376,11 +376,11 @@
var toggleRadio = function($element) {
var $input = $element.prev(),
+ $form = $input.closest('form.custom'),
input = $input[0];
if (false === $input.is(':disabled')) {
-
- $('input:radio[name="' + $input.attr('name') + '"]').next().not($element).removeClass('checked');
+ $form.find('input:radio[name="' + $input.attr('name') + '"]').next().not($element).removeClass('checked');
if ( !$element.hasClass('checked') ) {
$element.toggleClass('checked');
}

0 comments on commit ac4ddb6

Please sign in to comment.