problem description
A time picker implemented by myself, click the OK button to get the selected time when it pops up. When popping up dynamically, you can customize the pop-up class, so that multiple time selectors can be distinguished. Currently encountered, dynamically added pop-up window, unable to obtain the situation.
effect
Code
$(document).on("click",".layer-btn-ok",function(e){
let a = $(this).parents(".chuzu-agree-end")
console.log(a)
})
"chuzu-agree-end"
because each pop-up window, the parent"s class name is customizable. How can I get the [OK] button through a custom class?