Skip to content

Commit 4b94adc

Browse files
committed
Close academicpages#2637 toggle the wrapper on resize
1 parent a932981 commit 4b94adc

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

assets/js/_main.js

+10
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
========================================================================== */
44

55
$(document).ready(function(){
6+
// These should be the same as the settings in _variables.scss
7+
scssLarge = 925; // pixels
8+
69
// Sticky footer
710
var bumpIt = function() {
811
$("body").css("margin-bottom", $(".page__footer").outerHeight(true));
@@ -30,6 +33,13 @@ $(document).ready(function(){
3033
$(".author__urls-wrapper button").toggleClass("open");
3134
});
3235

36+
// Restore the follow menu if toggled on a window resize
37+
jQuery(window).on('resize', function() {
38+
if ($('.author__urls.social-icons').css('display') == 'none' && $(window).width() >= scssLarge) {
39+
$(".author__urls").css('display', 'block')
40+
}
41+
});
42+
3343
// init smooth scroll, this needs to be slightly more than then fixed masthead height
3444
$("a").smoothScroll({offset: -65});
3545

assets/js/main.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)