Thanks for the advice Tom.
Thanks Tom! I tested this out, and it works with one column, but I tried to expand it to more columns (as a test I made three columns), and regardless of which button I press, only the final column will be selected. I thought maybe it was an issue with giving all the buttons the same class name, so I gave them each a unique ID, but the problem persists. This is how I adjusted the code: var qobj = this;var q = jQuery("#"+qobj.questionId);/*c4 for column 1, c5 for column 2, etc.*/var inputs = q.find(".c4").find("[type=radio],[type=checkbox]"); q.find("#setall1").click(function() { inputs.each(function() { var parts = this.id.split("~"); qobj.setChoiceValue(parts[2],parts[3],true); }); }); var inputs = q.find(".c5").find("[type=radio],[type=checkbox]"); q.find("#setall2").click(function() { inputs.each(function() { var parts = this.id.split("~"); qobj.setChoiceValue(parts[2],parts[3],true); }); });
Already have an account? Login
Enter your username or e-mail address. We'll send you an e-mail with instructions to reset your password.
Sorry, we're still checking this file's contents to make sure it's safe to download. Please try again in a few minutes.
Sorry, our virus scanner detected that this file isn't safe to download.