SmarterTraveller

My Trip

Save your favourites and create your own trip

Hint: Leave useful notes to help plan your perfect trip


My List

<> // scroll to top window.scrollTo(0, 0); window.scroll({ top: 0, left: 0, behavior: 'smooth' }); // scroll to top \\ function selectCode(currency,code) { // let query = new URLSearchParams(window.location.search.replace('?', '')); // query.set(currency, code); // window.location.href = '?' + query.toString(); let selectedCode =code.toString(); let selectedCurrency =currency.toString(); // set endpoint and your access key access_key = 'c6659c5d225cba96f50a2faa4738bcc7'; symbols='USD,AED,ANG,CAD,BWP,ZAR,ZMW' endpoint = 'convert'; // define from currency, to currency, and amount from = 'EUR'; to = code; $(".prices").each(function(){ amount =$(this).html(); // execute the conversion using the "convert" endpoint: $.ajax({ url: 'http://data.fixer.io/api/' + endpoint + '?access_key=' + access_key +'&from=' + from + '&to=' + to + '&amount=' + amount, dataType: 'jsonp', success: function(json) { // access the conversion result in json.result $(this).html(json.result); } }); }); } AOS.init();