Revisions
-
thisgeek revised this gist
Aug 27, 2012 . 1 changed file with 2 additions 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 @@ -2,7 +2,8 @@ jQuery(function() { var myApi, verts; // Query for sub-navigation elements. Make each vertically // scrollable. Save query object as local variable to allow // methods to be added to the instance. verts = $(".vertScrollable").each(function(i, e) { $(e).scrollable({ vertical: true, -
thisgeek revised this gist
Aug 27, 2012 . 1 changed file with 7 additions and 0 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,6 +1,8 @@ jQuery(function() { var myApi, verts; // Query for sub-navigation elements. Make each vertically // scrollable. Save query object as local variable. verts = $(".vertScrollable").each(function(i, e) { $(e).scrollable({ vertical: true, @@ -9,6 +11,7 @@ jQuery(function() { }); }); // Add resetScroll method to sub-navigation query instance verts.resetScroll = function () { this.each(function (i, e) { $(e).data("scrollable").seekTo(0); @@ -18,6 +21,10 @@ jQuery(function() { $("#scrollable").scrollable(); myApi = $("#scrollable").data("scrollable"); // Iterate through a list of class selectors mapped to indicies. // Bind a click event listener to each element returned by the // selector query. On click, scroll to the index mapped to the // selector and reset the subnavigation scrolling to zero. $.each({ ".nutrition": 0, ".fitnessExercise": 1, -
thisgeek revised this gist
Aug 27, 2012 . 1 changed file with 3 additions 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 @@ -10,7 +10,9 @@ jQuery(function() { }); verts.resetScroll = function () { this.each(function (i, e) { $(e).data("scrollable").seekTo(0); }); }; $("#scrollable").scrollable(); -
thisgeek revised this gist
Aug 27, 2012 . 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 @@ -10,7 +10,7 @@ jQuery(function() { }); verts.resetScroll = function () { this.data("scrollable").seekTo(0); }; $("#scrollable").scrollable(); -
thisgeek revised this gist
Aug 27, 2012 . 1 changed file with 27 additions and 32 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,39 +1,34 @@ jQuery(function() { var myApi, verts; verts = $(".vertScrollable").each(function(i, e) { $(e).scrollable({ vertical: true, prev: ".healthup", next: ".healthdown" }); }); verts.resetScroll = function () { this.seekTo(0); }; $("#scrollable").scrollable(); myApi = $("#scrollable").data("scrollable"); $.each({ ".nutrition": 0, ".fitnessExercise": 1, ".beautySkincare": 2, ".mindfulness": 3, ".quicktips": 4, ".recipes": 5, ".glossary": 6 }, function (selector, index) { $(selector).click(function () { myApi.seekTo(index); verts.resetScroll(); }); }); }); -
thisgeek revised this gist
Aug 27, 2012 . 1 changed file with 38 additions and 34 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,35 +1,39 @@ jQuery(document).ready(function() { $(".vertScrollable").each(function(i, e) { $(e).scrollable({ vertical: true, prev: ".healthup", next: ".healthdown" }); }) $("#scrollable").scrollable(); var myApi = $("#scrollable").data("scrollable"); $(".nutrition").bind('click', function() { myApi.seekTo(0); $(".vertScrollable").data("scrollable").seekTo(0); }); $(".fitnessExercise").bind('click', function() { myApi.seekTo(1); $(".vertScrollable").data("scrollable").seekTo(0); }); $(".beautySkincare").bind('click', function() { myApi.seekTo(2); $(".vertScrollable").data("scrollable").seekTo(0); }); $(".mindfulness").bind('click', function() { myApi.seekTo(3); $(".vertScrollable").data("scrollable").seekTo(0); }); $(".quicktips").bind('click', function() { myApi.seekTo(4); $(".vertScrollable").data("scrollable").seekTo(0); }); $(".recipes").bind('click', function() { myApi.seekTo(5); $(".vertScrollable").data("scrollable").seekTo(0); }); $(".glossary").bind('click', function() { myApi.seekTo(6); $(".vertScrollable").data("scrollable").seekTo(0); }); }); -
thisgeek revised this gist
Aug 27, 2012 . 1 changed file with 7 additions and 0 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 @@ -6,23 +6,30 @@ $("#scrollable").scrollable(); var myApi = $("#scrollable").data("scrollable"); $(".nutrition").bind('click', function() { myApi.seekTo(0); $(".vertScrollable").data("scrollable").seekTo(0); }); $(".fitnessExercise").bind('click', function() { myApi.seekTo(1); $(".vertScrollable").data("scrollable").seekTo(0); }); $(".beautySkincare").bind('click', function() { myApi.seekTo(2); $(".vertScrollable").data("scrollable").seekTo(0); }); $(".mindfulness").bind('click', function() { myApi.seekTo(3); $(".vertScrollable").data("scrollable").seekTo(0); }); $(".quicktips").bind('click', function() { myApi.seekTo(4); $(".vertScrollable").data("scrollable").seekTo(0); }); $(".recipes").bind('click', function() { myApi.seekTo(5); $(".vertScrollable").data("scrollable").seekTo(0); }); $(".glossary").bind('click', function() { myApi.seekTo(6); $(".vertScrollable").data("scrollable").seekTo(0); }); }); -
thisgeek revised this gist
Aug 27, 2012 . 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 @@ -2,7 +2,7 @@ jQuery(document).ready(function() { $(".vertScrollable").each(function (i, e) { $(e).scrollable({vertical:true,prev:".healthup",next:".healthdown"}); }) $("#scrollable").scrollable(); var myApi = $("#scrollable").data("scrollable"); $(".nutrition").bind('click', function() { myApi.seekTo(0); -
thisgeek revised this gist
Aug 27, 2012 . 1 changed file with 2 additions 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 @@ -2,7 +2,8 @@ jQuery(document).ready(function() { $(".vertScrollable").each(function (i, e) { $(e).scrollable({vertical:true,prev:".healthup",next:".healthdown"}); }) .scrollable().data("scrollable"); var myApi = $("#scrollable").data("scrollable"); $(".nutrition").bind('click', function() { myApi.seekTo(0); }); -
thisgeek revised this gist
Aug 27, 2012 . 1 changed file with 1 addition 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 @@ -2,8 +2,7 @@ jQuery(document).ready(function() { $(".vertScrollable").each(function (i, e) { $(e).scrollable({vertical:true,prev:".healthup",next:".healthdown"}); }) var myApi = $("#scrollable").scrollable().data("scrollable"); $(".nutrition").bind('click', function() { myApi.seekTo(0); }); -
thisgeek revised this gist
Aug 27, 2012 . 1 changed file with 3 additions 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 @@ -1,5 +1,7 @@ jQuery(document).ready(function() { $(".vertScrollable").each(function (i, e) { $(e).scrollable({vertical:true,prev:".healthup",next:".healthdown"}); }) $("#scrollable").scrollable(); var myApi = $("#scrollable").data("scrollable"); $(".nutrition").bind('click', function() { -
34tth3r1ch created this gist
Aug 26, 2012 .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,26 @@ jQuery(document).ready(function() { $("#vertScrollable").scrollable({vertical:true,prev:".healthup",next:".healthdown"}); $("#scrollable").scrollable(); var myApi = $("#scrollable").data("scrollable"); $(".nutrition").bind('click', function() { myApi.seekTo(0); }); $(".fitnessExercise").bind('click', function() { myApi.seekTo(1); }); $(".beautySkincare").bind('click', function() { myApi.seekTo(2); }); $(".mindfulness").bind('click', function() { myApi.seekTo(3); }); $(".quicktips").bind('click', function() { myApi.seekTo(4); }); $(".recipes").bind('click', function() { myApi.seekTo(5); }); $(".glossary").bind('click', function() { myApi.seekTo(6); }); });