I have a page with a search button on it.
in my Javascript i have a click event that looks like this:
if(blah){
$('#search').click();
}
$('#search').on('click', function(){
// Do something
});
What would be the reason the if statement wouldn't click the button to cause the onclick to fire?
All of this is wrapped in an onReady as well.
The html on the page is a standard button:
<button id='search' type="button" class="btn btn-primary">Search RefID</button>
blahevals to a false... triggering a click will also only run the defined click handler, not the native functionality.click()so I know it gets there