the event
object has a target
attribute (The DOM element that initiated the event).
Hence:
$(event.target) //gives you a jQuery wrapper on the DOM element that initiated the event
In order to get its class, you can do the following:
$(event.target).attr("class")
I'm not sure what you're trying to accomplish, but I hope this answers your question.
Regarding "ui.item" that you've mentioned - you can do pretty much the same with it too:
$(ui.item).attr("class")
From the few hints you gave me after my questions, I'm guessing you're trying to change the appearance of the tooltip widget, and that's why you're trying to get the "class".
Take a look at jQuery UI Tooltip widget documentation
ui-tooltip: The outer container for the tooltip.
ui-tooltip-content: The content of the tooltip.
EDIT:
If none of these were what you looked for, you can always investigate the event
object.
take a look at:
event.currentTarget
event.delegateTarget
event.relatedTarget
event.data
event.toElement