I have two divs with ids: #addNew_tab
and #sendCom_tab
.
I want to click on any of them to trigger the same jQuery click()
function.
I was thinking something like this:
$("#addNew_tab", "#sendCom_tab").click(function(){ //do stuff });
But this doesn't work.
Changed from:
To:
The comma inside the selector (
"a, b")
means the first plus the second; just like CSS selectors(Well, it's a CSS selector...)
It is equal to: