I was wondering how can I setup a voting system that comes up on an image when the mouse is hovered over them.
For example lets say look at the images on this widget http://jsfiddle.net/4B2Bc/. I was wondering when the user hovers their mo开发者_开发技巧use over the image a thumbs up or thumbs down is shown, which can be used for voting.
That would be a lot easier if you use jQuery! Instead of writing the script from scratch you can just use a plugin for jQuery.
If you want to enlarge the image when a user click on it, then take a look at this for example: http://www.no-margin-for-errors.com/projects/prettyphoto-jquery-lightbox-clone/
You just load jQuery and prettyPhoto and add something like this
$(document).ready(function(){
$("img").prettyPhoto();
});
Then all your images will open in a box when you click on them.
I am also sure that you can find a voting plugin somewhere on the web for jQuery. Very easy!
And if you don't find one, you can alwasy write it yourself ;-)
精彩评论