Jquery右下角抖動、浮動 實(shí)例代碼(兼容ie6、FF)
更新時(shí)間:2013年08月15日 18:02:51 作者:
本實(shí)例結(jié)合了jquery+js中的setTimeout函數(shù)實(shí)現(xiàn)了一直浮動在頁面右下解的廣告,有需要的朋友可以參考一下
復(fù)制代碼 代碼如下:
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', '關(guān)閉']);" /><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', '關(guān)閉']);" /></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();
您可能感興趣的文章:
- jQuery實(shí)現(xiàn)動態(tài)表單驗(yàn)證時(shí)文本框抖動效果完整實(shí)例
- jQuery實(shí)現(xiàn)網(wǎng)頁抖動的菜單抖動效果
- jQuery+css3實(shí)現(xiàn)文字跟隨鼠標(biāo)的上下抖動
- jQuery插件jRumble實(shí)現(xiàn)網(wǎng)頁元素抖動
- jQuery通過擴(kuò)展實(shí)現(xiàn)抖動效果的方法
- jquery果凍抖動效果實(shí)現(xiàn)方法
- jquery.messager.js插件導(dǎo)致頁面抖動的解決方法
- 基于jquery的仿百度的鼠標(biāo)移入圖片抖動效果
- jQuery模擬窗口抖動效果
相關(guān)文章
jQuery動態(tài)生成的元素綁定事件操作實(shí)例分析
這篇文章主要介紹了jQuery動態(tài)生成的元素綁定事件操作,結(jié)合實(shí)例形式分析了jQuery事件綁定的原理及動態(tài)生成的元素綁定事件相關(guān)操作技巧,需要的朋友可以參考下2019-05-05jQuery實(shí)現(xiàn)可兼容IE6的滾動監(jiān)聽功能
這篇文章主要介紹了jQuery實(shí)現(xiàn)可兼容IE6的滾動監(jiān)聽功能,結(jié)合實(shí)例形式分析了jQuery針對不同瀏覽器的事件監(jiān)聽、響應(yīng)及頁面屬性動態(tài)變換相關(guān)實(shí)現(xiàn)技巧,需要的朋友可以參考下2017-09-09jQuery簡單實(shí)現(xiàn)頁面元素置頂時(shí)懸浮效果示例
這篇文章主要介紹了jQuery簡單實(shí)現(xiàn)頁面元素置頂時(shí)懸浮效果的方法,涉及jQuery針對頁面元素樣式的動態(tài)操作技巧,需要的朋友可以參考下2016-08-08