Skip to content
Advertisement

Cannot click input element within button element

Take a look at the below markup & fiddle: http://jsfiddle.net/minlare/oh1mg7j6/

JavaScript

In Chrome, each element within the button can be selected through the developer console and js click events are delegated.

In Firefox/IE you cannot select the child elements or pickup js click events.

Is there a way around this in Firefox/IE?

Advertisement

Answer

It is not suggested to use elements inside button and so you can use “div” instead of “button” which will make it working both in mozilla and chrome. Check below

JavaScript

http://jsfiddle.net/oh1mg7j6/8/

Advertisement