Closed simonferndriger closed 1 year ago
Isn't a cloned element in jQuery a virtual Element? So don't you need to select the element after appending it to get the correct instance?
$e = $('template').contents().clone();
$('body').append($e);
$('clonedTemplateSelector').Lazy();
That could be, however, with jQuery I can perform all regular acitons on that virtual element, so I don't see any reason why this should not be the case here... I could save an additional select and thereby improve performance.
I close this, more of an edge case and I will not invest into it actually.
When using
$e = $('template').contents().clone()
as an element and appending it with$('body').append($e)
, calling$e.Lazy()
afterwards triggers a JS error "Cannot call .toLowerCase() of undefined".