From 6461b60e33db1dff3918c64d7dc898aac9144297 Mon Sep 17 00:00:00 2001 From: viniciusban Date: Tue, 15 Dec 2015 15:31:46 -0200 Subject: [PATCH] Consider input-group for radiobuttons --- js/foundation.abide.js | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/js/foundation.abide.js b/js/foundation.abide.js index 0729142f1..3ac0aa773 100644 --- a/js/foundation.abide.js +++ b/js/foundation.abide.js @@ -268,20 +268,13 @@ } else if ($el[0].type === 'radio') { radioGroupName = $el.attr('name'); - label = $el.siblings('label'); if (self.validateRadio(radioGroupName)) { - $(label).each(function() { - if ($(this).hasClass(self.options.labelErrorClass)) { - $(this).removeClass(self.options.labelErrorClass); - } - }); + self.removeErrorClasses($el); $el.trigger('valid.fndtn.abide', $el[0]); } else { - $(label).each(function() { - $(this).addClass(self.options.labelErrorClass); - }); + self.addErrorClasses($el); $el.trigger('invalid.fndtn.abide', $el[0]); }; } -- 2.47.2