I have successfully implemented the following:
when I click on a jquery rating star, the value of a selectbox gets changed.
What I want to do now is to change the value of the select box to 0 when the "cancel rating" button is clicked.
I have checked the plugin's website and saw there is a callback option ("TEST 3-A").
http://www.fyneworks.com/jquery/star-rating/#tab-Testing
For some reason, it's not working for me, though.
My code so far:
| <!-- rating --> | |
| <div class="formitem"> | |
| <label for="rating" class=""><font color="red">Initial Rating</font></label> | |
| <select name="rating" id="ratingselector" class="selector"> | |
| <option selected>0</option> | |
| <option>0.5</option> | |
| <option>1</option> | |
| <option>1.5</option> | |
| <option>2</option> | |
| <option>2.5</option> | |
| <option>3</option> | |
| <option>3.5</option> | |
| <option>4</option> | |
| <option>4.5</option> | |
| <option>5</option> | |
| </select> | |
| <div class="right"> | |
| <input type="radio" class="star {split:2}" name="rating2" value="0.5" /> | |
| <input type="radio" class="star {split:2}" name="rating2" value="1" /> | |
| <input type="radio" class="star {split:2}" name="rating2" value="1.5" /> | |
| <input type="radio" class="star {split:2}" name="rating2" value="2" /> | |
| <input type="radio" class="star {split:2}" name="rating2" value="2.5" /> | |
| <input type="radio" class="star {split:2}" name="rating2" value="3" /> | |
| <input type="radio" class="star {split:2}" name="rating2" value="3.5" /> | |
| <input type="radio" class="star {split:2}" name="rating2" value="4" /> | |
| <input type="radio" class="star {split:2}" name="rating2" value="4.5" /> | |
| <input type="radio" class="star {split:2}" name="rating2" value="5" /> | |
| </div> | |
| <div style="clear:left;"></div> | |
| </div> |