$(".Alphabeticals").click(function() {
var id = this.id;
$('#district option[value=NoValue]').attr('selected', 'selected');
$(".yellow, .display-numb").show();
$(".Alphabeticals").removeClass('selected');
$(this).addClass('selected');
$("#Brand_Name").html("All Restaurants Starting With Letter (" + id + ")");
var pageInitial = "<?php echo $thisPage;?>";
$("#results").load(pageInitial + "/Mobile/Search/LetterResult.php", {
"letter": id,
});
$("#results").on("click", ".paginating a", function(e) {
e.preventDefault();
$(".loading-div").show();
var page = $(this).attr("data-page");
$("#results").load(pageInitial + "/Mobile/Search/LetterResult.php", {
"letter": id,
"page": page
}, function() {
$(".loading-div").hide();
});
});
});
If i alert(id) after the .click function it alert the right value ( Values lays between A to Z ) but if i alert after the .on("click",....) it alert all the previous value till the last one chooses
e.g :
if i click on A both alert fire "A" if i click on C the first alert fire "C" but the second one alert "A", "C" if i chooses G the first alert also fire "G" and the second one fire "A", "C", "G" how can i make the pagination send only the element chooses without sending all the previous values

New Topic/Question
Reply


MultiQuote


|