My 2 cents:
- Use jQuery toggleClass : http://api.jquery.com/toggleClass/
- Use camelCase : currencycode -> currencyCode etc.
- Use English everywhere : 'monnaie' should not be there
- Booleans are awesome
if($myCurrencycode == $initCurrencycode) { hasChanged = false; console.log(hasChanged); } else { hasChanged = true; console.log(hasChanged); }should be
hasChanged = ($myCurrencycode != $initCurrencycode) console.log( hasChanged );
- Finally,
if(!$menuDropdown.hasClass('hide')) { $menuDropdown.addClass('hide'); }can be replaced with
$menuDropdown.addClass('hide');it will not add the class multiple times.