JSFiddle - React, Tailwind, and code Playground

HTML

<!-- <a class="pager" title="next" href="www.text.com">NEXT</a> -->

JavaScript

var href = $.map($("*").contents(), function(el) {
    var html   = $.parseHTML( $.trim(el.nodeValue) ),
        anchor = $('<div />').append(html).find('a.pager[title="next"]');
    
    return el.nodeType === 8 && anchor.length ? anchor.attr('href') : null;
});

console.log(href)