[ad_1]
I am trying to perform a trigger click of the button on the double click of the list element.
I have 2 elements. One is a button and the second is a UL list element.
Here is the HTML button and List code.
<button type="button" class="btn btn-primary" data-toggle="modal" id="show_comment_modal" data-target="#showCommentModal"> Show Comment </button>
<ul>
<li id="category_list_1">Coffee</li>
<li id="category_list_2">Tea</li>
<li id="category_list_3">Milk</li>
</ul>
Here is the Jquery code:
$( "#category_list_1" ).dblclick(function() {
$( "#show_comment_modal" ).trigger( "click" );
});
I did not get any error in console.
Did this even possible?
[ad_2]