I would use this (http://speckyboy.com/2012/09/11/clas...ss-and-jquery/) script to apply style to my radio fields, but as I am using PHP WHILE the radio when I select one of the other results is no longer selected. How do I do this dynamically?
Each result will have 3 radio fields. I wish only one could be selected in each result.
jQuery:
HTML Code:$(document).ready(function(){ $(".row a").on("click", function(e){ e.preventDefault(); if($(this).hasClass("sel")) { // already selected } else { $("a.sel").removeClass("sel"); $(this).addClass("sel"); var rid = $(this).attr('id'); var value = '[value="'+rid+'"]'; $('input:radio[name="category"]').filter(value).attr('checked', true); } }); });



Reply With Quote

Bookmarks