JS Focus Graph Linkage Effect code

Source: Internet
Author: User
Tip: You can modify some of the code before running

<!--linkage began--> <style type=text/css> #divScroller1 {z-index:9; Overflow:hidden; width:456px; Position:absolute; height:219px; Visbility:visible}. dynpage {z-index:10; left:0px; Visibility:hidden; Color:black; Position:absolute; top:0px} </STYLE> <script language=javascript type=text/javascript> function Lib_bwcheck () {//BROWSERC Heck (needed) this.ver=navigator.appversion this.agent=navigator.useragent this.dom=document.getelementbyid?1:0 This.opera5=this.agent.indexof ("Opera 5") >-1 this.ie5= (This.ver.indexOf ("MSIE 5") >-1 && This.dom & &!this.opera5)? 1:0; This.ie6= (This.ver.indexOf ("MSIE 6") >-1 && this.dom &&!this.opera5)? 1:0; this.ie4= (document.all &&!this.dom &&!this.opera5)? 1:0; this.ie=this.ie4| | this.ie5| | This.ie6 this.mac=this.agent.indexof ("Mac") >-1 this.ns6= (this.dom && parseint (this.ver) >= 5)? 1:0; this.ns4= (document.layers &&!this.dom)? 1:0; this.bw= (this.ie6 | | this.ie5 | | this.ie4 | | this.ns4 | | this.ns6 | | this.opera5) return this} var bw=new lib_bwcheck () /*** variables to configure ... ***/var numscrollpages = 4//set The number of pages (layers) here. var transitionout = 1; The ' Out ' effect ... 0= no effect, 1= fade var transitionin = 1; The ' in ' effect ... 0= no effect, 1= fade, 2= slide var slideacceleration = 0.2; If You use the slide animation, set this somewhere between 0 and 1. if (document.layers) {//ns4 resize fix ... scrx= innerwidth; scry= innerheight; onresize= function () {if (scrx!= innerwidth | | scry!= innerheight) {history.go (0)}}} function Scrollerobj (obj,nest) {nest = (!nest)? "": ' Document. ' +nest+ '. ' This.elm = Bw.ie4?document.all[obj]:bw.ns4?eval (nest+ ' document. +obj):d Ocument.getelementbyid (obj) this.css = Bw.ns4?this.elm:this.elm.style This.doc = bw.ns4?this.elm.document: Document This.obj = obj+ ' scrollerobj '; Eval (this.obj+ ' =this ') this.x = (bw.ns4| | bw.oPERA5)? this.css.left:this.elm.offsetLeft this.y = (bw.ns4| | BW.OPERA5)? this.css.top:this.elm.offsetTop THIS.W = (bw.ie4| | bw.ie5| | bw.ie6| | BW.NS6)? this.elm.offsetwidth:bw.ns4?this.elm.clip.width:bw.opera5?this.css.pixelwidth:0 this.h = (bw.ie4| | bw.ie5| | bw.ie6| | BW.NS6)? This.elm.offsetheight:bw.ns4?this.elm.clip.height:bw.opera5?this.css.pixelheight:0} Object methods ... scrollerobj.prototype.moveTo = function (x,y) {if (x!=null) {this.x=x; this.css.left=x} if (Y!=null) { This.y=y; This.css.top=y}} scrollerobj.prototype.moveBy = function (x,y) {This.moveto (this.x+x,this.y+y)} Scrollerobj.prototype.hideIt = function () {this.css.visibility= ' hidden '} scrollerobj.prototype.showIt = function () { this.css.visibility= ' visible '}/****************************************************************/var Onlineormyefile = 1; var activepage = null; var busy = 0; function Activate (num) {if (Activepage!=pages[num] &&!busy) {busy = 1; if (transitionout==0 | |!bw.opacity) {activepage.hideit (); actiVatecontinue (num); else if (transitionout==1) activepage.blend (' Hidden ', ' activatecontinue (' +num+ ') '); } function activatecontinue (num) {busy = 1; ActivePage = Pages[num]; Activepage.moveto (0,0); if (transitionin==0 | |!bw.opacity) {activepage.showit (); busy=0;} else if (transitionin==1) {activepage.blend (' visible ', ' busy=0 '); else if (transitionin==3) {activepage.slide (0, Slideacceleration,, ' busy=0 ');} = = = = = Call Transform Process = = = = = = = = = = = = = = = = = = = = =//============ Transform set ========== function startshow (num) {if startshow = 2 else if (num = = 2) {num = 3;} else if (num = = 3) {num = 4;} else if (num = = 4) {num = 1;} SetTimeout (' Activate (' +num+ ') ', 6000); } scrollerobj.prototype.blend= function (Vis, FN) {if (bw.ie5| | Bw.ie6 &&!bw.mac) {if (vis== ' visible ') this.css.filter= ' Blendtrans (duration=0.9) '; Else this.css.filter= ' Blendtrans (duration=0.6) '; This.elm.onfilterchange = function () {eval (FN);}; This.elm.filters. blendtrans.apply (); This.css.visibility= Vis; This.elm.filters.blendTrans.play (); else if (BW.NS6 | | bw.ie&&!bw.mac) {this.css.visibility= ' visible '; vis== ' visible '? This.fadeto (7, FN): This.fadeto (0, 9, FN); else {this.css.visibility= vis; Eval (FN); } }; var pageslidefadeloaded = 0; function Initpageslidefade () {scroller1 = new Scrollerobj (' DivScroller1 '); pages = new Array (); PAGES[0] = null; for (var i=1 i<=numscrollpages; i++) {pages[i] = new Scrollerobj (' Dynpage ' +i, ' divScroller1 '); Pages[i].moveto (0,0); } bw.opacity = (bw.ie &&!bw.ie4 && navigator.userAgent.indexOf (' Windows ') >-1) | | BW.NS6 if (bw.ie5| | Bw.ie6 &&!bw.mac) pages[1].css.filter= ' Blendtrans (duration=0.6) '; Loads the Windows 9.x filters module. Activatecontinue (1); if (bw.ie) for (var i=0;i<document.links.length;i++) Document.links[i].onfocus=document.links[i].blur; pageslidefadeloaded = 1; } function Writesub (num) {for (var i=1; i<= num; i++) {document.write (' +i+ '); }//if the browser is OK and the script is started onload. if (bw.bw &&!pageslidefadeloaded) onload = Initpageslidefade; </SCRIPT> <div id=divscroller1> <div class=dynpage id=dynpage1> </DIV> <div C Lass=dynpage id=dynpage2> </DIV> <div class=dynpage id=dynpage3> </DIV> <div Class=dyn Page id=dynpage4> </DIV> <div id= "dynamic" > </DIV> </DIV></DIV><!--linkage End--> <style type=text/css> #dynamic {position:relative; z-index:100; top:200px; float:right;} dynamiclink {font-size : 11px; Font-family:arial, Helvetica, Sans-serif; Font-weight:bold; Background: #5FA204; padding:0px 5px; margin-right:5px; Text-decoration:none; Color: #ffffff;} A.dynamiclink:link {font-size:11px; font-family:arial, Helvetica, Sans-serif; font-weight:bold; background: #5FA204; padding:0px 5px; margin-right:5px; Text-decoration:nonE Color: #ffffff;} a.dynamiclink:hover {font-size:11px; font-family:arial, Helvetica, Sans-serif; font-weight:bold; background: #FF5700; padding:0px 5px; margin-right:5px; Text-decoration:none; Color: #ffffff;} </style>
Tip: You can modify some of the code before running

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.