Hello to all and happy new year,
Well i have some divs, each div has 2 hrefs that sending some attributes in a php file.
the first href is has a class voteu and when its pressed i am using the code bellow:
<script type="text/javascript">
$(document).ready(function() {
$(".voteu").click(function()
{
var id = $(this).attr("id");
var uip = $(this).attr("uip");
var up = $(this).attr("up");
var vn = $(this).attr("vn");
var dataString = 'id='+ id + '&uip='+ uip + '&vn='+ vn;
var parent = $(this);
$('#myloader').fadeIn("fast");
$.ajax({
type: "POST",
url: "up_vote.php",
data: dataString,
cache: false,
success: function(html)
{
$('#myloader').fadeOut("fast");
}
});
});
});
</script>
My problem is that my loader div that contains the loading image works only for the first div.
If i am pressing the second or thertd etc href with class voteu the loader div appears only in the first div.
Any suggestions please?