如何使用jquery代码让网站标题滚动起来
当前的浏览器使用多选项卡模式。如果网站的标题很长,在浏览器标签栏中是看不到的。为了更加个性化,我们可以使用如下个性化的jquery代码,让您的网站标题栏滚动起来,让用户更容易记住您的网站名称;
如果你想使用个性化jquery代码让你的标题栏滚动起来,把下方的jquery代码复制到你网站的js文件里,就能使用了;要注意这是jquery代码,需要引用jquery库才能正常运行。
$(function(){
var titlename= $(document).attr("title").split("");
function gdtitle(){
titlename.push(titlename[0]);
titlename.shift();
document.title = titlename.join("");
}
setInterval(gdtitle,1000);//设置时间间隔运行
)};
文章来源网络,作者:运维,如若转载,请注明出处:https://shuyeidc.com/wp/114760.html<