Search code examples
jqueryhref

Exclude target=_blank links


I have following jquery Expression:

$('a').on("click", function (e) {
    window.LoadingPanel.Show();
});

How do I exclude all links with target="_blank"?


Solution

  • $("a[target!='_blank']").on("click", function (e) {
        window.LoadingPanel.Show();
    });