I can use some help identifying an issue I have with an on click event. I am using jquery to get around an issue I am having. I don't have access to the application code, so I need to use jquery to patch something up.
I have a close element and a button (dumbed down for the sake of simplicity). The essentially closes a modal and pseudo refreshes the page via an ajax call.
When I execute my on click event, the forced click on the works perfectly. Function is called and all is well, however after the page refreshes, the forced click on the button does not work. Any ideas why the second forced click won't work? Not sure if it is an issue with some sort of bind I am not aware of or what. Any help would be appreciated.
<div>
<div class="close">Close</div>
<button class="doSomething" ng-click="performFunc()">Pop Modal</button>
</div>
$('.close').on('click',function(){
$('button.doSomething').click();
});