popline icon indicating copy to clipboard operation
popline copied to clipboard

It does not work on the ajax loaded text

Open Dimun017 opened this issue 8 years ago • 1 comments

Hi, its a great plugin!

  1. When the page is loaded, when you select text plugin works. When changing text on the page using ajax, plugin also works.
  2. When the page is loaded, and then the text changes using ajax - when you select text to change the text of the plugin does not work.

How can I fix this?

Dimun017 avatar Mar 30 '16 17:03 Dimun017

May likely need to change element selector from $(element).on('event', function() {....}); to $(document).on('event', 'element', function() {....}); This will always allow for selection of ajax loaded content since an ajax load does not change the 'document' element.

somesayinice avatar Apr 02 '16 21:04 somesayinice