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
| /* apply a natural box layout model to all elements */ | |
| *, *:before, *:after { | |
| -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; | |
| } |
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
| <!DOCTYPE html> | |
| <html class="no-js"> | |
| <head> | |
| <meta charset="utf-8"> | |
| <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> | |
| <title></title> | |
| <meta name="description" content=""> | |
| <meta name="viewport" content="width=device-width"> | |
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
| /*! | |
| * jQuery Cycle Plugin | |
| * Examples and documentation at: http://jquery.malsup.com/cycle/ | |
| * Copyright (c) 2007-2013 M. Alsup | |
| * Version: 3.0.2 (19-APR-2013) | |
| * Dual licensed under the MIT and GPL licenses. | |
| * http://jquery.malsup.com/license.html | |
| * Requires: jQuery v1.7.1 or later | |
| */ | |
| ;(function($, undefined) { |
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
| .fullWH{ | |
| width: 100%; | |
| height: 323px; | |
| } | |
| #bg1 { | |
| background-image: url( "../img/bg1.png" ); | |
| } | |
| #bg2 { | |
| background-image: url( "../img/bg2.png" ); | |
| } |
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
| $(window).on("mousemove", function (e) { console.log(e.clientY) }); | |
| $(window).on("mousemove", function (e) { console.log(e) }); |
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() { | |
| $(window).on("mousemove", mouseMoveHandler); | |
| function mouseMoveHandler(e) { | |
| var pos = e.clientY; | |
| console.log(pos); | |
| if (pos < 15) { | |
| //key take away, is once you've got the event you want to trigger, it's good to "Turn OFF" the listner | |
| $(window).off( "mousemove", mouseMoveHandler ); | |
| $(".footer-popup").animate({ | |
| bottom: 0 |
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 myLinkCollection = document.getElementsByTagName("a"); | |
| for (i=0;i<myLinkCollection.length;i++) { | |
| if (myLinkCollection[i].getAttribute("href")) { | |
| // do something with the anchor tags here | |
| } | |
| } |
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 big; | |
| if (x > 10) { | |
| big = true; | |
| } | |
| else { | |
| big = false; | |
| } | |
| //Short hand version | |
| var big = (x > 10) ? true : false; |
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
| if (variable1 !== null || variable1 !== undefined || variable1 !== '') { | |
| var variable2 = variable1; | |
| } | |
| //short hand | |
| var variable2 = variable1 || ''; |
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 a = new Array(); | |
| a[0] = "myString1"; | |
| a[1] = "myString2"; | |
| a[2] = "myString3"; | |
| //short hand version | |
| var a = ["myString1", "myString2", "myString3"]; |