i am trying to create like/dislike function like stackoverflow’s up vote and down vote function. Here is the sample code for what i have so far tried http://jsfiddle.net/Dd9Qa/3/ but i am not getting the desired result what i want is when i click like or dislike button in a particular div i should get the alert with the number in span field (further processing of increasing or decreasing of likes will be done here with ajax)
I want to get the value in span field when i click like/dislike button so that i can process it please help how can i do it..
You have to specify which
spanyou want to access.Try this: http://jsfiddle.net/Dd9Qa/9/