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

java - WARN : org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/board/] in DispatcherServlet with name 'appServlet' -

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

android - How to create dynamically Fragment pager adapter -