jquery - How can I merge two events to a selector? -


i have jquery codes want works separately fine. question is there way of putting 1 , still work?

$('#truck_brand').poshytip({classname: 'tip-yellowsimple', showon: 'focus', alignto: 'target', alignx: 'right', aligny: 'center', offsetx: 5}); $('#truck_brand').focus(function() { $('#brand_error').poshytip('hide'); }); 

how about:

$('#truck_brand').poshytip({classname: 'tip-yellowsimple', showon: 'focus', alignto: 'target', alignx: 'right', aligny: 'center', offsetx: 5}).focus(function() { $('#brand_error').poshytip('hide'); }); 

Comments