javascript - Prevent <button> being clicked without disabling it -


on page have <button> <input type="number" /> inside, when user clicks in <input> or it's spinner buttons <button>'s click event fire , <button> obtains :active style. setting <button disabled="disabled"> prevent click event firing <button> obtains disabled style.

what looking how make <button> unclickable using simple javascript, css, or html without hijacking click events, disabling it, or putting transparent on top. should appear normal when clicked must not change style or fire click event.

what have http://jsfiddle.net/tzu8glvm/

your restrictions cover lot of solutions. what's wrong disabled??

but happens, there css way. can set pointer-events: none on input, , clicks pass through.


Comments

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -