Simple jQuery code snippets to set and unset input values on radio buttons. Just thought I would share because I was having a few issues with earlier versions of jQuery and setting radio buttons on a form.
//jQuery Set Radio Button $('input[name="correctAnswer"]').attr('checked', false); //To unselect the button $("[name=color]").removeAttr("checked"); //jQuery (1.4+) code to pre-select one button : var presetValue = "black"; $("[name=color]").filter("[value="+presetValue+"]").attr("checked","checked");
Diving into ES2015
Get ahead of the curve with ES2015
React The ES6 Way
Have ES5 down pat? Take your career to the next level with this ReactJS and ES6 course.
ECMAScript 2015: A SitePoint Anthology
Jump Start Git
Take control of your code
It’s clean, it’s lean—it’s the MEAN Stack
A Deep Dive into Routing with hapi
Take a deeper dive into hapi routes and learn how to use parameters to create flexible routes to use within your applications. See how...
Yaphi Berhanu, 14 hours ago