I have a button inside a div to hide that div and I want to pass the div to the handler. Here is my current code:
$('#hidden-div').on('click', '#hide-btn', { element : $('#hidden-div') }, hideElement);
Is there any way to avoid reselecting the container? Something like this would be nice:
$('#hidden-div').on('click', '#hide-btn', { element : $(this) }, hideElement);