I'm trying to get autocomplete to work on clones by using delegate, but it doesn't appear to be working in Google Chrome.
Here's my attempt: http://jsfiddle.net/uGdm2/
Any ideas?
Thanks.
Yup try this:
var tags = ["PHP", "Perl", "Python"];
$('body').delegate('input.tags', 'focusin', function() {
if($(this).is(':data(autocomplete)')) return;
$(this).autocomplete({
"source": tags
});
});
var tagsdiv = $('#tags');
$('body').delegate('a.copy', 'click', function(e) {
e.preventDefault();
$(this).closest('div').clone().appendTo(tagsdiv);
});
http://jsfiddle.net/petersendidit/uGdm2/4/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With