On Apr 11, 3:35 am, DragonI <[EMAIL PROTECTED]> wrote: > Hi, > > I'm having a problem disabling the cancel button. Maybe it's just > me ;) > > code says: //required: false, // disables the 'cancel' button so user > can only select one of the specified values > > Here's what I tried: > > <form id="form1"> > <input class="star {required:false}" type="radio" name="test-1- > rating-2" value="1" title="Worst"/> > <input class="star {required:false}" type="radio" name="test-1- > rating-2" value="2" title="Bad"/> > <input class="star {required:false}" type="radio" name="test-1- > rating-2" value="3" title="Good"/> > <input class="star {required:false}" type="radio" name="test-1- > rating-2" value="4" title="Excellent"/> > </form> > > Also tried: > > $(function(){ $ > ('[EMAIL PROTECTED]').rating({required:false}); }); > > Thanks
I have the same problem, i fixed by just altering the js code on line 112. Replacing the if statement with a if(true) which will always be true. But I want to know how this can be fixed in html if I want to display more than one rating on the same page using the same js file. /*if($.rating.groups[n].readOnly || settings.required){*/ if(true){ // DO NOT display 'cancel' button } else{ // Display 'cancel' button $(this).before( $('<div class="cancel"><a title="' + settings.cancel + '">' + settings.cancelValue + '</a></div>') .mouseover(function(){ $.rating.event.drain(n, this, settings); $ (this).addClass('star_on'); }) .mouseout(function(){ $.rating.event.reset(n, this, settings); $ (this).removeClass('star_on'); }) .click(function(){ $.rating.event.click(n, this, settings); }) ); }