This file contains hidden or 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
| function getScrollWidth(){ | |
| // Create a div | |
| var scrollEle = document.createElement("div"), | |
| scrollWidth = 0; | |
| // Set it's styling | |
| scrollEle.style.width = "100px"; | |
| scrollEle.style.height = "100px"; | |
| scrollEle.style.overflow = "scroll"; | |
| scrollEle.style.position = "absolute"; |
This file contains hidden or 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
| // Create the http handler | |
| var http = require('http'); | |
| // Set the http protocol to have 10 sockets | |
| http.globalAgent.maxSockets = 10; |
This file contains hidden or 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
| /* | |
| next = top half (hidden) (.topHalfNext from part 2) | |
| current = top half (currently showing) (.topHalfCurrent from part 2) | |
| main = main background item (also represents the bottom half) (.main from part 2) | |
| title = updated title for the item | |
| */ | |
| // Set the next hidden item to the top and it's content to the updated display string | |
| next.css({top: 0}).html(title); |
This file contains hidden or 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
| var ReadyListener = function(itemLength, fn){ | |
| this.itemLength = itemLength; | |
| this.haveItems = 0; | |
| this.fn = fn; | |
| }; | |
| ReadyListener.prototype.add = function(name){ | |
| console.log(' '+name+': Ready'); | |
| this.haveItems++; | |
| this.haveAllCheck(); |
NewerOlder