Javascript = looked through Google and Stack Overflow -I am still lost as I am still new in programming and everything else. I have some questions that I need to know
so far, I have this below:
var getUrladdress = window.location.href; //get current url address
var sortbydiscount = "?sortby";
var discount = ["20","30","50","70"];
What I wanted to know how to do is:
- append string from discount array (I have tried to use append() but it doesn't work :(
- then compare the discount array against
percentDiscount(still being worked on in other question) - sort the items (final one) to display all items under 20%, 30% etc group.
Could you please give me insight/guide me on how to append string from discount array and then have the url show that "http://www.xxx.com?sortby30" in live address bar?
Then could it be possible to compare array against percentDiscount?
Many thank yous in advance.
EDITED:: #3 - I wanted to have sale items categorized in different discount group: i.e. if 20%, then all items which are on sale for 20% should be only displayed on the page.