Как сделать прямое событие (для случаев, когда вводится новое содержимое) с новым способом выполнения нескольких событий jQuery:
$('.foo', this).bind({
click: function() {
//do thing
},
mouseover: function() {
//do other thing
},
mouseout: function() {
//do other other thing
},
focus: function() {
//do other other other thing
}
});
Например, в приведенном выше тексте мне нужно связать любой контент с кликом, а также со всеми остальными событиями.
По сути, я стараюсь не писать:
$('.foo', this).live('click', function() {
//do thing
}
});
$('.foo', this).live('mouseover', function() {
//do other thing
}
});
$('.foo', this).live('mouseout', function() {
//do other other thing
}
});
$('.foo', this).live('focus', function() {
//do other other other thing
}
});