Permalink
Browse files

toggleRadio must only search for inputs in 's form, not all over the DOM

  • Loading branch information...
1 parent dd0e3ab commit 61066c52b64e102abf79ae29db06d24c4880d946 @vitoravelino vitoravelino 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 61066c5

Please sign in to comment.