I Have a <div> Element, which includes a Button.

Both have Events. Code for the Button:
<button Title="Auswahl anzeigen" class="PopUpButton2" onClick="findArticlesFromSearchBoxButton()">OK</button>');
Code for the Div-Element:
<div draggable="true" Title="aus aatentechnichen Gründen können beide Suchmethoden noch nicht miteinander kombiniert werden!" onMouseDown="dragStart(this);" id="divArtikelart">
When I click to the button also the clicks on die div-Elements are executed. How can i avoid this?
$("button").click(function(event){
event.stopPropagation();
});
Add stopPropogation at first line in your button click function. this should resolve issue
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With