Basically I have code which is follows:
$('selector').on('click',function(){
//Do something here
});
$('selector').click(function(){
//Does exact same thing.
});
Is it possible to combine these? Or would I simply make a function to call from inside both of these bindings?
Apologies if this has been answered, I did check the suggested questions, but didn't find any answers.
$('selector').click()
is just a shortcut to $('selector').on('click')