$(document.getElementById("item1"), document.getElementById("item2")).click(function () {
$(this).fadeOut();
});
<span id="item1">This is item 1</span><br /> <span id="item2">This is item 2</span>
span#item1 { color: red; }
span#item2 { color: green; }
span#item1
is affected. span#item2
not, that means I made mistake in syntax. Is there a way to get it to work. I know exact IDs for items that I want to affect.