Hi All!
I found a simple star-rating system based on mootools, dhtml and css. It seems to work fine with one exception that I just can't seem to figure out.
You set it up as in the following:
<td class='td_stars'>
<ul id="price" class="rating onestar">
<li id="1" class="rate one"><a href="#" title="1 Star"></a></li>
<li id="2" class="rate two"><a href="#" title="2 Stars"></a></li>
<li id="3" class="rate three"><a href="#" title="3 Stars"></a></li>
<li id="4" class="rate four"><a href="#" title="4 Stars"></a></li>
<li id="5" class="rate five"><a href="#" title="5 Stars"></a></li>
<li id="6" class="rate six"><a href="#" title="6 Stars"></a></li>
<li id="7" class="rate seven"><a href="#" title="7 Stars"></a></li>
<li id="8" class="rate eight"><a href="#" title="8 Stars"></a></li>
<li id="9" class="rate nine"><a href="#" title="9 Stars"></a></li>
<li id="10" class="rate ten"><a href="#" title="10 Stars"></a></li>
</ul>
Notice the href='#' - when you click on a star the URL gets rewritten and a # gets appended to it... which is no problem if the stars are above the scroll point (which the top 3 are) but if you have scrolled down to the 4th + rating and click a star the page "refreshes" or "hops" and you are taken back to the top.
To see this click here and then scroll down to the "Number of People" rating and click one of the stars.
Obviously the original designer is using the link to create a simple "onclick()" event so that he can change/set the star clicked on from the yellow "hoover star" to a "permanent green star" but the # thing... well, thats just GOTTA go!
Any ideas, thoughts, suggestions? I'll share what ever code needs to be shared.
Thanks!
Pete