Sep
29

Create Simple JQuery Voting Application for Multiple Records

This tutorial is very simple and I created for those readers who feel some problems in creating or implementing a single voting or rating system for multiple records on a single page. I hope you can get an idea how to do this thing to be done. I didnt use Ajax and and PHP here but You can make it dynamic easily because you can get html and working idea from here. So if you know little bit jQuery and Ajax then you can do it. Also you can get some help from my others Rating and Voting tutorials to how to make an Ajax call. I hope you will like this.
Thanks !


Other Popular Tutorials on 99Points

JQuery Code

$(function() {
	$('.voteUp').click(function(){ 
 
		var id = $(this).parent().attr('id').replace('text-id-','');
 
		$("#light-text-"+id).animate({
			height: "37px"
		}, "fast", function() {
 
			$('#up-'+id).hide();
			$('#down-'+id).show();
		});
 
	});
	////
	$('.voteDown').click(function(){ 
 
		var id = $(this).parent().attr('id').replace('text-id-','');
 
		$("#light-text-"+id).animate({
			height: "0px"
		}, "fast", function() {
 
			$('#down-'+id).hide();
			$("#light-text-"+id).hide();
			$('#up-'+id).show();
		});
 
	});
});

Add To Facebook Stumble This Digg This Add To Del.icio.us Add To Reddit Add To Yahoo Add To Twitter


Written by ZeeShaN

ZeeShaN RasooL is a web developer who loves to work in latest technologies to create more interactive dynamic and beautiful web pages.








Enter your Email:

Click Here for Popular

Who I Am

Zeeshan Rasool

Software Engineer - PHP
Lahore - Pakistan

zeeshan(@)99points.info
Skype: zeeshan-rasool
gTalk: zishan.rasool85

Categories

Tags

Comments