convert string to html jquery code example
Example 1: convert jquery to string
var $elem = $('<a href="#">Some element</a>');
console.log("HTML is: " + $elem.get(0).outerHTML);
Example 2: jquery parse html
const jsdom = require("jsdom");
const { JSDOM } = jsdom;
const { window } = new JSDOM();
const { document } = (new JSDOM('')).window;
global.document = document;
const $ = jQuery = require('jquery')(window);
const html = $("<div/>").append( html );
Example 3: jquery parse html
const $ = jQuery = require('jquery');
const html = $("<div/>").append( html );