Delegate
Attach a handler to one or more events for all elements that match the selector, now or in the future, based on a specific set of root elements.
<div>
<div id="divDelegate">
<p style="background-color: red;"> Click me!</p>
</div>
<?php
echo
YsJQuery::delegate()
->in('#divDelegate')
->selector('p')
->eventType('click')
->handler(
'$(this).after("<p style=\"background-color: yellow;\">Test!</p>");'
)
->execute() ?>
</div>
Click me!

Support requests, bug reports, and off-topic comments will be deleted without warning.