Last active
October 20, 2016 06:52
-
-
Save VasiliuKr/eec5b1e23c6e06ad4e022595428d3fce to your computer and use it in GitHub Desktop.
Revisions
-
VasiliuKr revised this gist
Oct 20, 2016 . 1 changed file with 2 additions and 23 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,40 +1,19 @@ var myModule = (function () { var init = function () { _setUpListeners(); // то, что должно произойти сразу }; var _setUpListeners = function () { // прослушка событий... }; return { init: init }; })(); myModule.init(); -
VasiliuKr revised this gist
Oct 18, 2016 . 1 changed file with 24 additions and 2 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,18 +1,40 @@ var myMouseParallax = (function () { var layer = $('.parallax').find('.parallax__layer'); var init = function () { _setUpListeners(); // то, что должно произойти сразу }; var _setUpListeners = function () { $(window).on('mousemove', _moveLayers); // прослушка событий... }; var _moveLayers = function (e) { var mouse_dx = e.pageX, mouse_dy = e.pageY, w = (window.innerWidth / 2) - mouse_dx, h = (window.innerHeight / 2) - mouse_dy; layer.map(function (key, value) { var bottomPosition = ((window.innerHeight / 2) * ((key + 1) / 100)), widthPosition = w * ((key + 1) / 100), heightPosition = h * ((key + 1) / 100); $(value).css({ 'bottom': '-' + bottomPosition + 'px', 'transform': 'translate3d(' + widthPosition + 'px, ' + heightPosition + 'px, 0px)' }); }); }; return { init: init }; })(); myMouseParallax.init(); -
VasiliuKr revised this gist
Oct 9, 2016 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -7,7 +7,7 @@ var myModule = (function () { var _setUpListeners = function () { // прослушка событий... }; return { init: init -
VasiliuKr created this gist
Aug 26, 2016 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,18 @@ var myModule = (function () { var init = function () { _setUpListeners(); // то, что должно произойти сразу }; var _setUpListeners = function () { // прослушка событий... } return { init: init }; })(); myModule.init();