+ 1
Responsive like button
How to make a responsive like button .when user hit the button it count the total number of like
8 Antworten
- 2
how about using ajax for instant refreshing of likes and saving too?
+ 3
following
+ 1
you have to save the counts in a file or a database.
then when you refresh your page it should read the file or the database and display you.
+ 1
JS:
var x = 0;
function addClick(){x++;}
HTML:
<button onclick="addClick()">Click Me!</button>
Then if you want you could write X to the screen, or update the innerHTML of a string to show a counter.
+ 1
@suhail facebook api usses an fb account to like any. post.
+ 1
@Raithen the count will come back to zero when you refresh the page.
0
@MR Programmer, correct although he did not specify saving it externally and loading it in later. For saving, read http://almostidle.com/tutorial/javascript-saving
- 1
u can use facebook likes and comments API