Thanks, you cannot combine multiple jQuery objects and then call . You need one selector. So either: .live().live()
$('#selecto, #matic, #hello').live('click', function() {
console.log('one of those divs was clicked');
});
or pre-define the function and attach it separately:
function log() {
console.log('one of those divs was clicked');
}
div1.live('click', log);
div2.live('click', log);
div3.live('click', log);
source
share