I have a code in below. There I want to print the alert not inside button click. I have tried something like $(".aaa:not(selected)").find("button")on("click", function(){}); didn't work.
$(".aaa").find("button").on("click", function (){
alert("this should not be executed inside button click");
});