jQuery - HTML string of jquery variable

0 votes
376 views
added Jul 26, 2019 in jQuery by LC Marshal Captain (25,790 points)
// This variable string contains HTML character
nextData = '<div>this is test data for next article></div>';

// Can't use them inside each(function()
if(infEl.length) {
  mainContent.append(nextPost());
}

 

1 Response

0 votes
responded May 18, 2020 by lcjr First Warrant Officer (11,530 points)
var prlxLabel = '<div class="prlxlabel">Scroll to continue with content</div>',
    prlxLabelEnd = '<div class="prlxlabel end">Scroll to continue with content</div>';
    
contentPara.append(prlxLabel);
contentParaEnd.prepend(prlxLabelEnd);

 

lazacode.org - Malaysia's programming knowledge sharing platform, where everyone can share their finding as reference to others.
...