Compliant IE6 fixed code JQuery (function ($j) { $j (' #pop '). Positionfixed () //}) (function ($j) { $j. positionfixed = function (EL) { $j (EL). each (function () { New fixed (this) }) Return el; } $j. fn.positionfixed = function () { Return $j. positionfixed (This) } var fixed = $j. Positionfixed.impl = function (EL) { var o=this; o.sts={ Target: $j (EL). css (' position ', ' fixed '), Container: $j (window) } O.sts.currentcss = { Top:o.sts.target.css (' top '), Right:o.sts.target.css (' right '), Bottom:o.sts.target.css (' Bottom '), Left:o.sts.target.css (' left ') } if (!O.IE6) return; O.bindevent (); } $j. Extend (fixed.prototype,{ IE6: $.browser.msie && $.browser.version < 7.0, Bindevent:function () { var o=this; O.sts.target.css (' position ', ' absolute ') O.overrelative (). Initbasepos (); O.sts.target.css (O.sts.basepos) O.sts.container.scroll (O.scrollevent ()). Resize (O.resizeevent ()); O.setpos (); }, Overrelative:function () { var o=this; var relative = O.sts.target.parents (). Filter (function () { if ($j (this). css (' position ') = = ' relative ') return this; }) if (Relative.size () >0) Relative.after (o.sts.target) return o; }, Initbasepos:function () { var o=this; O.sts.basepos = { Top:o.sts.target.offset (). Top-(o.sts.currentcss.top== ' auto '? O.sts.container.scrolltop (): 0), Left:o.sts.target.offset (). Left-(o.sts.currentcss.left== ' auto '? O.sts.container.scrollleft (): 0) } return o; }, Setpos:function () { var o=this; O.sts.target.css ({ Top:o.sts.container.scrolltop () + O.sts.basepos.top, Left:o.sts.container.scrollleft () + O.sts.basepos.left }) }, Scrollevent:function () { var o=this; return function () { O.setpos (); } }, Resizeevent:function () { var o=this; return function () { settimeout (function () { O.sts.target.css (O.STS.CURRENTCSS) O.initbasepos (); O.setpos () },1) } } }) }) (JQuery) JQuery (function ($j) { $j (' #footer '). Positionfixed () }) Pop Right bottom corner window function Author: yanue function Pop (Title,url,intro) { This.title=title; This.url=url; This.intro=intro; this.apeartime=1000; this.hidetime=500; this.delay=10000; Add information This.addinfo (); Show This.showdiv (); Shut down This.closediv (); } pop.prototype={ Addinfo:function () { $ ("#popTitle a"). attr (' href ', this.url). html (this.title); $ ("#popIntro"). HTML (This.intro); $ ("#popMore a"). attr (' href ', this.url); }, Showdiv:function (Time) { if (!) ( $.browser.msie && ($.browser.version = = "6.0") &&!$.support.style)) { $ (' #pop '). Slidedown (This.apeartime). Delay (This.delay). fadeout (400);; else{//call Jquery.fixed.js, resolve IE6 cannot use fixed $ (' #pop '). Show (); JQuery (function ($j) { $j (' #pop '). Positionfixed () }) } }, Closediv:function () { $ ("#popClose"). Click (function () { $ (' #pop '). Hide (); } ); } } |