Answers for "jquery replace h1 with h2"

0

jquery replace h1 with h2

$(selector).load(url, function(){ // your existing load function
      $(selector).find('h1').replaceWith(function() {
                return '<h2>' + $(this).text() + '</h2>';
      });
});
Posted by: Guest on April-29-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language