Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

jquery replace h1 with h2

$(selector).load(url, function(){ // your existing load function
      $(selector).find('h1').replaceWith(function() {
                return '<h2>' + $(this).text() + '</h2>';
      });
});
Source by forum.jquery.com #
 
PREVIOUS NEXT
Tagged: #jquery #replace
ADD COMMENT
Topic
Name
8+5 =