Created
July 15, 2014 12:06
-
-
Save anonymous/92fc55a7bde8e85f33e6 to your computer and use it in GitHub Desktop.
Chiphell
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
this.run = function() { | |
var fixedheight = 0; | |
if (this.openflag && this.nvdata.next) { | |
var nvnexttop = document.body.scrollTop || document.documentElement.scrollTop; | |
var dofixed = nvnexttop !== 0 && document.documentElement.clientHeight >= 15 && this.nvdata.next.getBoundingClientRect().top - this.nvdata.height < 0; | |
if (dofixed) { | |
if (this.nv.style.position != 'fixed') { | |
this.nv.style.borderLeftWidth = '0'; | |
this.nv.style.borderRightWidth = '0'; | |
this.nv.style.height = this.nvdata.height + 'px'; | |
this.nv.style.width = this.nvdata.width + 'px'; | |
this.nv.style.top = '0'; | |
this.nv.style.left = this.nvdata.left + 'px'; | |
this.nv.style.position = 'fixed'; | |
this.nv.style.zIndex = '199'; | |
this.nv.style.opacity = 0.85; | |
} | |
} else { | |
if (this.nv.style.position != this.nvdata.position) { | |
this.reset(); | |
} | |
} | |
if (this.nv.style.position == 'fixed') { | |
fixedheight = this.nvdata.height; | |
} | |
} | |
return fixedheight; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment