Here is my HTML:
<input type="text" name="" class="customize-input clickDp" list="dpA1" id="dropdown-Account">
<span class="show-dropdown"><img src="images/click-dp.png"></span>
<datalist id="dpA1">
<option value="1"/>
<option value="2"/>
</datalist>
What I want is to show the dropdown once I click the span .show-dropdown.
So far here is my code:
$('.show-dropdown').on('click',function(){
var e = $.Event("keydown");
e.which = 40; // # Some key code value
e.keyCode = 40
$(".clickDp").trigger(e);
//$(".clickDp").trigger('keyup', [{preventDefault:function(){},keyCode:40}]); })