I don't know how to pass $(this) in direct call
var parentLI = $("#nav .parent");
parentLI.hoverIntent(function() {
showUL($(this));
}, function() {
hideUL($(this));
});
You can give the functions by reference:
parentLI.hoverIntent(showUL, hideUL);
Then in those functions you can refer to the element which raised the event by the this
keyword:
function showUL() {
var $el = $(this);
// do something with $el...
}