0){ requestPageType = 'Book a Service'; } if(jQuery(this).closest('.request-a-quote.contentpage.section').length > 0){ requestPageType = 'Request a Quote'; } if(jQuery(this).closest('.request-a-test-drive.contentpage.section').length > 0){ requestPageType = 'Request a Test Drive'; } if(jQuery(this).attr('href') == '#map'){ setTimeout(function() { jQuery('.location_mapview .center_list ul li:first a').click(); jQuery('.location_mapview .center_list ul li:first a').addClass('center_on'); }, 100); branchDealerList('mapview', 1, true, false, maxpageno, showradiobutton, requestPageType); } else{ branchDealerList('listview', 1, true, false, maxpageno, showradiobutton, requestPageType); } }); }); function branchDealerList(dealermode, pageno, firstpage, lastpage, maxpageno, showradiobutton, requestPageType = null){ //console.log("firstpage : " + firstpage); //console.log("lastpage : " + lastpage); jQuery.ajax({ type : "POST", dataType : "json", url : "https://kiairaq.com/wp-admin/admin-ajax.php", data : { action: "get_more_dealerlist", dealermode: dealermode, pageno: pageno, showradiobutton: showradiobutton, requestPageType: requestPageType, pageradioBool : pageradioBool }, success: function(response) { //console.log('------------- Response -----------'); //console.log(response); //console.log(jQuery('.location_listview .pagination li:last-child a').attr('data-pageno')); if(dealermode == 'listview'){ jQuery('.location_listview .location_table tbody').html(response.data); var oldCurrentPage = jQuery('.location_listview .pagination span.current').text(); jQuery('.location_listview .pagination span.current').replaceWith('
'+oldCurrentPage+'
'); jQuery('.location_listview .pagination .pagenumber[data-pageno="'+pageno+'"]').replaceWith('
'+pageno+'
'); if(pageno == maxpageno){ lastpage = true; } if(lastpage == true){ jQuery('.location_listview .pagination .last').replaceWith('
»
'); jQuery('.location_listview .pagination .first').replaceWith('
«
'); } else{ jQuery('.location_listview .pagination .last').replaceWith('
»
'); } if(firstpage == true){ jQuery('.location_listview .pagination .last').replaceWith('
»
'); jQuery('.location_listview .pagination .first').replaceWith('
«
'); } else{ jQuery('.location_listview .pagination .first').replaceWith('
«
'); } } if(dealermode == 'mapview'){ jQuery('.location_mapview .center_list .listInner ul').html(response.data); var oldCurrentPage = jQuery('.location_mapview .pagination span.current').text(); jQuery('.location_mapview .pagination span.current').replaceWith('
'+oldCurrentPage+'
'); jQuery('.location_mapview .pagination .pagenumber[data-pageno="'+pageno+'"]').replaceWith('
'+pageno+'
'); if(pageno == maxpageno){ lastpage = true; } if(lastpage == true){ jQuery('.location_mapview .pagination .last').replaceWith('
»
'); jQuery('.location_mapview .pagination .first').replaceWith('
«
'); } else{ jQuery('.location_mapview .pagination .last').replaceWith('
»
'); } if(firstpage == true){ jQuery('.location_mapview .pagination .last').replaceWith('
»
'); jQuery('.location_mapview .pagination .first').replaceWith('
«
'); } else{ jQuery('.location_mapview .pagination .first').replaceWith('
«
'); } } //jQuery('.pagination span.current').replaceWith('
'+jQuery('.pagination span.current').text()+'
'); } }); } jQuery(document).on('click', '.pg_num_area .pagination li a', function(e){ if(jQuery(this).closest('.pg_num_area').hasClass('searchpagepagination') == false){ e.preventDefault(); //console.log('request_quote : ' + jQuery(this).closest('.request_quote').length); //console.log("book-a-service contentpage section : " + jQuery(this).closest('.book-a-service.contentpage.section').length); //var pageno = jQuery(this).text(); var pageno = jQuery(this).attr('data-pageno'); var dealermode; var firstpage = false; var lastpage = false; var showradiobutton = false; var maxpageno = (jQuery('.location_listview .pagination li').length - 2); var requestPageType = null; if(jQuery(this).closest('.location_listview').length ==1){ dealermode = 'listview'; } else{ dealermode = 'mapview'; } if(jQuery(this).hasClass('first') == true){ firstpage = true; } if(jQuery(this).hasClass('last') == true){ lastpage = true; } //if(pageno == maxpageno){ lastpage = true; } if(pageno == 1){ firstpage = true; } if(jQuery(this).closest('.request_quote').length == 1){ showradiobutton = true; } if(jQuery(this).closest('.book-a-service.contentpage.section').length > 0){ requestPageType = 'Book a Service'; } if(jQuery(this).closest('.request-a-quote.contentpage.section').length > 0){ requestPageType = 'Request a Quote'; } if(jQuery(this).closest('.request-a-test-drive.contentpage.section').length > 0){ requestPageType = 'Request a Test Drive'; } branchDealerList(dealermode, pageno, firstpage, lastpage, maxpageno, showradiobutton, requestPageType); } }); jQuery(document).on("click", '.request_quote.find-a-dealer .find_dealer .location_table .form_chk label', function(){ jQuery('.request_quote.find-a-dealer .find_dealer .location_table .form_chk label').removeClass('r_on'); jQuery(this).addClass('r_on'); }); jQuery(document).on("click", '.request_testdrive.find-a-dealer .find_dealer .location_table .form_chk label', function(){ jQuery('.request_testdrive.find-a-dealer .find_dealer .location_table .form_chk label').removeClass('r_on'); jQuery(this).addClass('r_on'); }); /*jQuery(document).on("click", '.request_quote .car-selector.section .car_list .car_box .car_a, .book_service .car-selector.section .car_list .car_box .car_a', function(){ if(jQuery(this).hasClass('on') == true){ jQuery(this).removeClass('on'); } else{ jQuery(this).addClass('on'); } });*/
open menu
Showroom
All Vehicles
CARS
SUV & MPV
COMMERCIAL
CARS
Picanto
PEGAS
RIO
Cerato
K5
K8
K3
EV9
SUV & MPV
SONET
SPORTAGE
SORENTO
TELLURIDE
CARNIVAL
SELTOS
Carens
EV9
COMMERCIAL
K4000S
CARS
Picanto
PEGAS
RIO
Cerato
K5
K8
K3
EV9
SUV & MPV
SONET
SPORTAGE
SORENTO
TELLURIDE
CARNIVAL
SELTOS
Carens
EV9
COMMERCIAL
K4000S
CARS
SUV & MPV
COMMERCIAL
Shopping tools
Live Stream Showroom
OUR BRANCHES
Download a Brochure
Request a Test Drive
Request a quote
Service and Parts
Book a service
Service & care
DISCOVER KIA
Our Movement
Innovation
Sponsorship
News
Promotion
Contact Us
العربية
Find a dealer
Search
Search
Util Menu
open search
Search
close search
SERVICE CENTER
Maintenance
Location
Parts