You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have an Ajax function written in Javascript to load the items while scrolling with Colcade.
The issue is that I can't find the way to convert this jQuery line of code to Javascript. I would like to wrap the Ajax data into an objet and use it to parse the HTML.
const posts = $(data);
I'm using colc.append(posts) to load the items. However I'm not sure if posts has to be a jQuery object?
I have an Ajax function written in Javascript to load the items while scrolling with Colcade.
The issue is that I can't find the way to convert this jQuery line of code to Javascript. I would like to wrap the Ajax data into an objet and use it to parse the HTML.
const posts = $(data);
I'm using
colc.append(posts)
to load the items. However I'm not sure if posts has to be a jQuery object?The JS:
Thank you.
EDIT
Following to a discussion on a forum, the equivalent in Vanilla javascript would be using
DOMParser()
to parse the HTML:However this produces the following error in the console:
Unhandled Promise Rejection: HierarchyRequestError: The operation would yield an incorrect node tree
The error points the Colcade JS file
fragment.appendChild( elem );
The text was updated successfully, but these errors were encountered: