The hoverIntent event is bound to the elements on page load. At that time no elements have the class 'selected-food', so all of them trigger the hoverIntent event, even if you later add the 'selected-food' class to them.
Here is a working example:
$('.food-name').hoverIntent({
over: function() {
if (!$(this).hasClass('selected-food')) {
$(this).children('.food-ingredients').show();
}
},
out: function() {
$(this).children('.food-ingredients').hide();
},
timeout: 300
});
$('.food-name').click(function() {
$(this).toggleClass('selected-food');
});
Link to jsfiddle: http://jsfiddle.net/7uPcc/8/