I have a selector for the id="original" element that triggers on click a function called on_click_behaviour and I need another selector id="other" to mimic/inherit all of its behaviours or just the click.
How can I make the other selector inherit all the functions from the original so that when i click the other selector it will trigger the on_click_behaviour as well?
// can not touch this code as it's core
$( "#original" ).click(function() {
on_click_behaviour();
});
<div id="original">close window</div>
<div id="other">close same window</div>
I am looking for something like this:
$( "#other" ).inherit_behaviours_from( "#original" );