Why i cant write variable as selector in "on" handler. How will be right?
var buttons = $('.sector').find('button');
$(document).on('click', buttons, function() { // here buttons not found
//...
})
$(document).on('click', '.sector button', function() { // here works
//...
})
Content can be after ajax request, so i need write $(document) not $(buttons) !?