D
D
darknez2015-11-08 08:40:28
JavaScript
darknez, 2015-11-08 08:40:28

How to organize a currency change with memorization?

Hello everyone, help me find a script for organizing a currency change for a product on the site.
I tried to do it myself, but it didn’t work out
Price initially in dollars
Here is the code

<div class="curs-area">
                                    <div class="curs-current">Выбрать валюту</div>
                                    <ul class="curs-sel">
                                        <li data-val="usd" title="Доллар США">$ <span class="val">- USD</span></li>
                                        <li data-val="rub" title="Российский рубль"><span class="rouble">Р</span><span class="val"> - Рубль</span></li>
                                        <li data-val="eur" title="Евро">€ <span class="val">- Euro</span></li>
                                    </ul>
                                </div>

<span class="curs-form btn price" data-val="29$"><span class="curs-val">29</span><span class="curs-char"></span></span>

<script>
var curs_current = '';
var curs = [];
curs['usd'] = 1;
curs['eur'] = 0.91954;
curs['rub'] = 63.6832;

</script>


Help me write the code itself for changing the currency and storing it in cookies, maybe there is some kind of ready-made solution, och. need

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question