diff --git a/public/js/main_0.0.3.js b/public/js/main_0.0.3.js index 812fe65bb3..2519a4f66d 100644 --- a/public/js/main_0.0.3.js +++ b/public/js/main_0.0.3.js @@ -374,25 +374,22 @@ $(document).ready(function() { } }); } - - if($('.scroll-locker').html() != undefined){ + if($('.scroll-locker').html() != undefined){ function lockTop(initOff){ - $(window).scroll(function() { if ($(window).width() >= 992) { if ((($('.scroll-locker').offset().top - $(window).scrollTop()) + $('.scroll-locker').height()) >= ($('.fcc-footer').offset().top - $(window).scrollTop())) { - $('.scroll-locker').css('position', 'fixed').css('top', initOff).css('width', $($('.scroll-locker').parent()).width()).css('max-height', '75%').css('overflow-y', 'auto').css('overflow-x', 'hidden'); + $('.scroll-locker').css('position', 'fixed').css('top', initOff).css('width', $($('.scroll-locker').parent()).width()).css('max-height', '85%').css('overflow-y', 'auto').css('overflow-x', 'hidden'); $('.well').css('margin-right', '6px'); } else { - $('.scroll-locker').css('position', 'fixed').css('bottom', $('.fcc-footer') - (($('.scroll-locker').offset().top - $(window).scrollTop()) + $('.scroll-locker').height()) - ($('.fcc-footer').offset().top - $(window).scrollTop())).css('width', $($('.scroll-locker').parent()).width()).css('max-height', '75%').css('overflow-y', 'auto').css('overflow-x', 'hidden'); + $('.scroll-locker').css('position', 'fixed').css('bottom', $('.fcc-footer') - (($('.scroll-locker').offset().top - $(window).scrollTop()) + $('.scroll-locker').height()) - ($('.fcc-footer').offset().top - $(window).scrollTop())).css('width', $($('.scroll-locker').parent()).width()).css('max-height', '85%').css('overflow-y', 'auto').css('overflow-x', 'hidden'); $('.well').css('margin-right', '6px'); } } else { - $('.scroll-locker').css('position', 'inherit').css('top', 'inherit').css('width', '100%').css('max-height', '').css('overflow-y', 'auto').css('overflow-x', 'hidden'); + $('.scroll-locker').css('position', 'inherit').css('top', 'inherit').css('width', '100%').css('max-height', '85%').css('overflow-y', 'auto').css('overflow-x', 'hidden'); $('.well').css('margin-right', ''); } - }); } var $scrollLocker = $('.scroll-locker'); if ($scrollLocker.offset()) { @@ -401,8 +398,14 @@ $(document).ready(function() { $(window).on('resize', function(){ lockTop(initOff); }); + $(window).scroll(function() { + lockTop(initOff); + }); + $(document).ready(function(){ + lockTop(initOff); + }); } - } + } $('#comment-button').on('click', commentSubmitButtonHandler); }); diff --git a/seed/challenges/html5-and-css.json b/seed/challenges/html5-and-css.json index 86a0cd2e2c..cec3975c69 100644 --- a/seed/challenges/html5-and-css.json +++ b/seed/challenges/html5-and-css.json @@ -2400,103 +2400,8 @@ "descriptionEs": [], "namePt": "", "descriptionPt": [], - "nameDe": "Waypoint: Gib dem Div Element einen farbigen Hintergrund", - "descriptionDe": [ - "Erstelle eine Klasse namens \"gray-background\" mit der Hintergrund-Farbe grau. Füge diese Klasse deinem div Element hinzu.", - "Du kannst die Hintergrund-Farbe eines Elements mit der Eigenschaft \"background-color\" bestimmen.", - "Willst du den Hintergrund eines Elements zum Beispiel grün – \"green\" – einfärben, kannst du .green-background { background-color: green; } innerhalb deines style Elements verwenden." - ] - }, - { - "id": "bad87fee1348bd9aede07836", - "name": "Waypoint: Give a Background Color to a Div Element", - "dashedName": "waypoint-give-a-background-color-to-a-div-element", - "difficulty": 1.39, - "description": [ - "You can set an element's background color with the \"background-color\" attribute.", - "For example, if you wanted an element's background color to be \"green\", you'd use .green-background { background-color: green; } within your style element.", - "Create a class called \"gray-background\" with the background color of gray. Assign this class to your div element." - ], - "tests": [ - "assert($('div').hasClass('gray-background'), 'Give your div element the class \"gray-background\".')", - "assert($('.gray-background').css('background-color') === 'rgb(128, 128, 128)', 'Your div element should have a gray background.')" - ], - "challengeSeed": [ - "", - "", - "", - "

CatPhotoApp

", - "", - "

Click here for cat photos.

", - "", - "", - "", - "
", - "

Things cats love:

", - " ", - "

Top 3 things cats hate:

", - "
    ", - "
  1. flea treatment
  2. ", - "
  3. thunder
  4. ", - "
  5. other cats
  6. ", - "
", - "
", - "", - "
", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - "
" - ], - "challengeType": 0, - "nameCn": "", - "descriptionCn": [], - "nameFr": "", - "descriptionFr": [], - "nameRu": "", - "descriptionRu": [], - "nameEs": "", - "descriptionEs": [], - "namePt": "", - "descriptionPt": [], - "nameDe": "Waypoint: Gib dem Div Element einen farbigen Hintergrund", - "descriptionDe": [ - "Erstelle eine Klasse namens \"gray-background\" mit der Hintergrund-Farbe grau. Füge diese Klasse deinem div Element hinzu.", - "Du kannst die Hintergrund-Farbe eines Elements mit der Eigenschaft \"background-color\" bestimmen.", - "Willst du den Hintergrund eines Elements zum Beispiel grün – \"green\" – einfärben, kannst du .green-background { background-color: green; } innerhalb deines style Elements verwenden." - ] + "nameDe": "", + "descriptionDe": [] }, { "id": "bad87eee1348bd9aede07836",