Enable phone call functionality on change event (jQuery)

僤鯓⒐⒋嵵緔 提交于 2019-12-04 11:54:54

Did you try window.location = "tel:(44) 4444-4444" (whatever the number is in the anchor corresponding to the selectIndex) with the onChange event for <select>?

Edit:

click() will only trigger javascript event handlers and will not actually go to that URL. Im not sure if this would work but can you try window.location once.

$('.call-us-options').on('change', function() {

        window.location.href = $('.'+$(this).val()).attr('href');

});
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!