Example 1 — Official Demo: Click div:visible
Only currently visible divs get the click handler (jQuery API idea).
$("div:visible").on("click", function () {
$(this).text($(this).text() + " ✓");
});
$("#showHidden").on("click", function () {
$("div:hidden").show();
}); How It Works
- Select.
div:visiblefinds divs that take layout space now. - Bind. Only those divs receive the click handler.
- Reveal.
$("div:hidden").show()brings hidden divs into view.

