javascript - How to select only part of image on click -


i have star rating system website. i'd select 0 1/2 or full stars.

for single star click, want achieve this, , i'm not sure if can done in javascript of jquery:

if user clicks anywhere 1 left half, chooses 1/2 star; on right half, full star. of course, half's (ideally) divided right down middle - 50/50 of area space.

is can done?

the easier have 2 images per start, left , right image, , non-selected image serve background if nothing chosen.

you can develop simple framework make reusable throughout website (and future projects) i wonder, want dozens of other open source projects do?

as example, check rateit plugin examples:

http://www.radioactivethinking.com/rateit/example/example.htm

it includes need plus, nice ajax calls , several others settings makes easy use.


Comments

Popular posts from this blog

ios - UICollectionView Self Sizing Cells with Auto Layout -

node.js - ldapjs - write after end error -

DOM Manipulation in Wordpress (and elsewhere) using php -