I am using jQuery 1.4.5 on my page and use the loader ahead of an ajax request:
$.mobile.loading('show', {theme:"e", text:"", textonly:false, textVisible: false});
After finishing the request, I hide it:
$.mobile.loading('hide');
That works, but it produces an tag at the end of the page where the text would be located.
<div class="ui-loader ui-corner-all ui-body-e ui-loader-default">
<span class="ui-icon-loading"></span>
<h1></h1>
</div>
Several SEO tools are now issuing a warning due to this second h1 tag.
How can I remove the tag from the loader?
You can remove the needed element with the jQuery remove
method.
$('.ui-loader').find('h1').remove();