首页 > 编程 > JavaScript > 正文

Jquery右下角抖动、浮动 实例代码(兼容ie6、FF)

2019-11-20 22:24:15
字体:
来源:转载
供稿:网友
复制代码 代码如下:

setTimeout("document.getElementById('qq_dd').style.display='block'; ",5000);
// JavaScript Document
$(function(){
    if($.browser.msie&&$.browser.version=="6.0"&&$("html")[0].scrollHeight>$("html").height())
        $("html").css("overflowY","scroll");
        $("html").css("overflowX","hidden");
});
function right_down(){
document.writeln("<div id='qq_dd' class='foot_scroll' style='display:none;position:fixed; margin:3px;bottom:3px; right:5px;z-index:1000;_position:absolute; _top:expression(eval(document.documentElement.scrollTop+document.documentElement.clientHeight-this.offsetHeight-(parseInt(this.currentStyle.marginTop,10)||0)-(parseInt(this.currentStyle.marginBottom,10)||0)));_bottom:auto;'><div id='my_img' style='position:relative; *left:550px; width:214px; height:124px; font-size:12px; color:#1670eb; background:url(online_cn_fk.png) no-repeat;'><img src='closed_fk.jpg' style='float:right; cursor:pointer;' id='guanbi'onclick="_gaq.push(['_trackEvent', 'QQDD', 'Click', '关闭']);" /><a href='#'  target='_blank' style='display:block; margin:97px 0 0 100px; display:inline; float:left; color:#1670eb;'><img src='jieshou_fk.jpg' onclick="_gaq.push(['_trackEvent', 'QQDD', 'Click', '咨询']);"  border='0'/></a><span style='cursor:pointer; float:right; margin:74px 35px 0 0; display:inline;' id='guanbi0'><img src='jujue_fk.jpg' onclick="_gaq.push(['_trackEvent', 'QQDD', 'Click', '关闭']);" /></span></div></div>")
}
right_down();
$("#guanbi").click(function(){
$("#my_img").hide();
});
$("#guanbi0").click(function(){
$("#my_img").hide();
});
function rattleimage(){$("#my_img").animate({top:'+=3'},50);$("#my_img").animate({left:'+=3'},50);$("#my_img").animate({top:'-=3'},50);$("#my_img").animate({left:'-=3'},50);$("#my_img").animate({top:'+=3'},50);$("#my_img").animate({left:'+=3'},50);$("#my_img").animate({top:'-=3'},50);$("#my_img").animate({left:'-=3'},50);$("#my_img").animate({top:'+=3'},50);$("#my_img").animate({left:'+=3'},50);$("#my_img").animate({top:'-=3'},50);$("#my_img").animate({left:'-=3'},50);$("#my_img").animate({top:'+=3'},50);$("#my_img").animate({left:'+=3'},50);$("#my_img").animate({top:'-=3'},50);$("#my_img").animate({left:'-=3'},50);$("#my_img").animate({top:'+=3'},50);$("#my_img").animate({left:'+=3'},50);$("#my_img").animate({top:'-=3'},50); $("#my_img").animate({left:'-=3'},50);$("#my_img").fadeOut("slow");$('#my_img').fadeIn('slow');setTimeout("rattleimage()",10000);}
rattleimage();
发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表