JavaScript on Sorting Form

Concluído Postado Nov 17, 2014 Pago na entrega
Concluído Pago na entrega

URL: [login to view URL]

Need help with some javascript. Currently I have a sorting menu "Most Recent, Price, City Alphabet". The sorting functionality is working perfectly, however the javascript for switching between these is not working properly. I'm having issues with the removeParameter javascript.

Currently the sort will not clear out the prior search in the URL string. Example: If you sort via Price and then sort by Most Recent, it will clear our the price sort. But if you sort by City and then sort by Most Recent, it won't clear out the city sorting.

URL: [login to view URL]

Current code looks like:

$('select[name=sorting]').change(function() {

var current_option = $(this).find('option:selected').val();

if(current_option == 'recent') {

[login to view URL] = removeParameter([login to view URL], 'price');

}

else if(current_option == 'high') {

insertParam('price', 'high')

} else if(current_option == 'low') {

insertParam('price', 'low')

} else if(current_option == 'abc_desc') {

insertParam('city_sort', 'abc_desc')

} else if(current_option == 'abc_asc') {

insertParam('city_sort', 'abc_asc')

}

});

CSS HTML JavaScript PHP WordPress

ID do Projeto: #6744917

Sobre o projeto

10 propostas Projeto remoto Ativo em Nov 17, 2014

Concedido a:

mtavartkiladze

Hello, I have checked website and code you have posted, I can help you and can start working right now, please contact me so we can talk. Thanks

$133 USD em 3 dias
(101 Comentários)
7.0

10 freelancers estão ofertando em média $98 nesse trabalho

rajeshsonisl

Hello Mike! With 99% completion rate, 720 successfully completed projects, and a 5.00 reputation (maximum possible, 5.0) (Yes, not even 4.99 average rating, can be verified on my profile page https://www.freelancer. Mais

$105 USD em 1 dia
(1065 Comentários)
8.8
anmoltech

Hi there, I am a PHP developer and working on it for last 5 years. I have a very high quality expertise on custom software development. In my career I have developed many complex custom software , E learning system, L Mais

$84 USD in 3 dias
(187 Comentários)
7.0
justTry

Hello! Not only that but the alphabetic sorting does not clear out either, bud adds on top of the price sorting for example. I am reviewing the code now. Will let you know when have the solution (1 hour maybe). K Mais

$30 USD in 0 dias
(191 Comentários)
6.2
anshulikabansal

Hello Sir, Thanks for detailed posting. I am ready to take this assignment. Please start a PM on this. Thanks & Regards, Anshulika Bansal

$64 USD em 1 dia
(115 Comentários)
6.5
vjdev

Hi! My name is Eugene. I'm experienced developer. I can handle your request. If you are interested please contact me and we will discuss details. Thank you.

$150 USD in 3 dias
(19 Comentários)
5.5
Flattzi

FIRST TIME THIS IS NOT JAVASCRIPT, ITS PHP. AND I CAN DO IT IN 20 MINUTES JUST LET US TALK ABOUT DETAILS CHECK MY PROFILE MY CLIENTS ARE ALL THANKING FOR MY WORK

$30 USD in 0 dias
(40 Comentários)
5.1