问题
any good ajax samples for implementing voting similar to the up and down buttons of stackoverflow.com
回答1:
You create a page for voting like yoursite.com/vote?postid=1234&direction=up that saves the vote in the database. Then you create buttons or links for voting and perform an Ajax request when the user clicks the link:
jquery:
$.post("vote", { postid: the_id, direction: "up" })
回答2:
You can use this one: http://www.technabled.com/2011/02/pulse-lite-reddit-ajax-up-down-voting.html Disclosure: I am the developer.
来源:https://stackoverflow.com/questions/816808/are-there-any-ajaxprototype-or-jquery-plugin-sample-for-stackoverflow-like-vot