I'm developing pop-up button, so I designed code

`$(event.target).click(function() {
 window.open("/widget/dialog", "", "");
});`

However, it doesn't work when I click first time. It works well when I click second time. How can I solve this problem?