Tje Posted July 28, 2014 Share Posted July 28, 2014 Hi, in my code radio button disable when passing value is "0" <script type="text/javascript"> $('input[type="radio"]').prop('disable', function() { return $(this).next().text().match(/\((\d+)\)/)[1] == 0; }); </script> it's ok.what i want to do is,color a label or label text when this function true. <label > <input type="radio" name="radio" id="rd" value="" /> Click </label> please help me Quote Link to comment https://forums.phpfreaks.com/topic/290148-how-to-color-label-when-passing-value-0/ Share on other sites More sharing options...
cyberRobot Posted July 28, 2014 Share Posted July 28, 2014 You could use jQuery's .css() method: http://api.jquery.com/css/ Quote Link to comment https://forums.phpfreaks.com/topic/290148-how-to-color-label-when-passing-value-0/#findComment-1486305 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.