如何删除< h1> jQuery移动加载程序添加标签? [英] How to remove <h1> tag from jQuery mobile loader?

查看:105
本文介绍了如何删除< h1> jQuery移动加载程序添加标签?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在页面上使用jQuery 1.4.5,并在ajax请求之前使用了加载程序:

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>

由于第二个h1标签,现在有几个SEO工具正在发出警告.

Several SEO tools are now issuing a warning due to this second h1 tag.

如何从加载程序中删除标签?

How can I remove the tag from the loader?

推荐答案

您可以使用jQuery remove方法删除所需的元素.

You can remove the needed element with the jQuery remove method.

$('.ui-loader').find('h1').remove();

这篇关于如何删除&lt; h1&gt; jQuery移动加载程序添加标签?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆