Are there any Ajax(Prototype or JQuery Plugin) sample for stackoverflow-like voting?

半腔热情 提交于 2019-12-21 21:27:14

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!