Created
May 8, 2014 14:56
-
-
Save christophervigliotti/f0a1fc3cdef629f65609 to your computer and use it in GitHub Desktop.
Hacky Zurb Foundation 4 Checkbox Fixer
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
this.writeCheckbox = function(id,value){ | |
var doCheck = true; | |
var isChecked = false; | |
var selector = '#' + id; | |
if(value == 0 || value == '' || value == undefined){ | |
doCheck = false; | |
} | |
isChecked = $(selector).parent().children("span").hasClass("checked"); | |
if((doCheck == true && isChecked == false) || (doCheck == false && isChecked == true)){ | |
$(selector).click(); | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment