Published
- 1 min read
jquery replace h1 with h2
The solution for this is noted below
jquery replace h1 with h2
Solution
$(selector).load(url, function () {
// your existing load function
$(selector)
.find('h1')
.replaceWith(function () {
return '<h2>' + $(this).text() + '</h2>'
})
})
Try other methods by searching on the site. That is if this doesn’t work