click handler not working on frequently reloading div

36 Views Asked by At

This content div keep on reloading to display realTime data, due to which onClick event is not triggering. Please suggest a alternative

function () {
  function render() {
    content.empty()
    content.addCass('test').append(
     $('<div>').text('content goes here')
    ).on('click', () => {
       $('this').hide()        
       return false
    })
  }
var content = $('<div>')
return render()
}
0

There are 0 best solutions below