Okay to have jquery click function twice for same element?

Just for example sake


jQuery('div#id1, #id2').click(function(){
jQuery('div#actionarea').toggleClass("HD");
)}

//and then further down the page

jQuery('div#id1, #id2').click(function(){
//do something else
)}

Is there any issue with this?

All feedback appreciated!
Ryan

No issues - that’s what event listeners are for.

Well there is one possible issue - the order they run in is not defined and so the code in one cannot depend on the other having run first.

Perfect. Thanks