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
| // Set all transitions across browsers | |
| @mixin transition($property: all, $duration: .4s, $easing: ease-in-out) { | |
| -webkit-transition: $property, $duration, $easing; | |
| -moz-transition: $property, $duration, $easing; | |
| -ms-transition: $property, $duration, $easing; | |
| -o-transition: $property, $duration, $easing; | |
| transition: $property, $duration, $easing; | |
| } | |
| // Set drop shadows on elements |
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
| $(document).ready(function() { | |
| $(window).scroll( function(){ | |
| $('.scrollEffect').each( function(i){ | |
| var bottom_of_object = $(this).offset().top + $(this).outerHeight(); | |
| var bottom_of_window = $(window).scrollTop() + $(window).height() + 200; | |
| /* If the object is completely visible in the window, fade it it */ | |
| if( bottom_of_window > bottom_of_object ){ | |
| $(this).animate({'opacity':'1', 'top':'0px'},500); |
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
| // FADE IN | |
| // add .fadeIn class to element | |
| @-webkit-keyframes fadeIn { | |
| 0% { | |
| opacity: 0; | |
| } | |
| 100% { | |
| opacity: 1; | |
| } | |
| } |
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
| // http://stackoverflow.com/questions/29091830/auto-numbering-of-angularjs-ng-repeat-list | |
| // # | Name of student | Student ID | |
| // _________________________________ | |
| // 1 | Samuel Addo | 346578 | |
| // 2 | GRace Asumani | 965433 | |
| // 3 | Zein Akill | 123455 | |
| // 4 | David Addoteye | 678543 | |
| {{$index +1}} |
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
| // Globals and Variables // | |
| // Import Sass from files in the globals folder (no underscore) | |
| @import "globals/colors"; | |
| @import "globals/typography"; | |
| @import "globals/declarations"; | |
| @import "globals/base"; | |
| // Components // | |
| // Import Sass from the files in the components folder. | |
| // Make sure any custom components files you add are represented 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
| // Set all transitions across browsers | |
| @mixin transition($property: all, $duration: .4s, $easing: ease-in-out) { | |
| -webkit-transition: $property, $duration, $easing; | |
| -moz-transition: $property, $duration, $easing; | |
| -ms-transition: $property, $duration, $easing; | |
| -o-transition: $property, $duration, $easing; | |
| transition: $property, $duration, $easing; | |
| } | |
| // Set drop shadows on elements |
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
| // Take a px and convert to rem | |
| @function calculateRem($values) { | |
| @if $supports-rem { | |
| $max: length($values); | |
| @if $max == 1 { @return convert-to-rem(nth($values, 1)); } | |
| $remValues: (); | |
| @for $i from 1 through $max { |
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
| // MEDIA QUERY RANGES | |
| $x-small-range: (0, 27em) !default; // 432px - used only for checkout steps because of text wrapping | |
| $small-range: (0, 47.49em) !default; // 759px | |
| $medium-range: (47.5em, 59.99em) !default; // 760 - 959px | |
| $large-range: (60em, 99999999em) !default; // 960px up | |
| $screen: "only screen" !default; | |
| $landscape: "#{$screen} and (orientation: landscape)" !default; | |
| $portrait: "#{$screen} and (orientation: portrait)" !default; | |
| $x-small-only: "#{$screen} and (max-width: #{upper-bound($x-small-range)})" !default; | |
| $small-up: $screen !default; |
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 setTimeoutDelay; | |
| $('.myDropdown').mouseover(function(){ | |
| setTimeoutDelay = setTimeout(function(){ | |
| $('.myDropdown-expanded').show(); | |
| $('.myDropdown-header').addClass('myDropdown-hover'); | |
| }, 300); | |
| }).mouseout(function(){ | |
| clearTimeout(setTimeoutDelay); | |
| setTimeout(function(){ | |
| var isHover = $('.myDropdown-expanded').is(':hover'); |
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
| // run the initial function | |
| function greet(callback) { | |
| console.log('Hey!'); | |
| // you can include objects in your callback | |
| var data = { | |
| name: 'Piper' | |
| }; | |
| // then run a callback to run the callback function | |
| // which will add the callback functions as parameters on the main function | |
| callback(data); |