Skip to content

Instantly share code, notes, and snippets.

@ibrahim-kardi
Created November 4, 2023 17:58
Show Gist options
  • Save ibrahim-kardi/4fb0d018864772bce6ea436ba194b94a to your computer and use it in GitHub Desktop.
Save ibrahim-kardi/4fb0d018864772bce6ea436ba194b94a to your computer and use it in GitHub Desktop.
how to handle currency switcher
window.addEventlistener(DOMcontentloaded,()=>{
function currencyFormhandler(event){
event.target.form.submit();
}
document.querySelectorAll(.selecclass).forEach((elm)=>{
elm.addEventlistener('change'.currencyFormhandler)
})
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment