UNPKG

onmount

Version:

Run something when a DOM element appears and when it exits

8 lines (6 loc) 137 B
/* global $, alert */ $.onmount('.js-clickable', function () { $(this).on('click', function () { alert('You clicked me!') }) })