@@ -24,6 +24,27 @@ $(document).ready(function() {
|
||||
// FitVids init
|
||||
$("#main").fitVids();
|
||||
|
||||
// Sticky sidebar
|
||||
var stickySideBar = function() {
|
||||
var show =
|
||||
$(".author__urls-wrapper button").length === 0
|
||||
? $(window).width() > 1024 // width should match $large Sass variable
|
||||
: !$(".author__urls-wrapper button").is(":visible");
|
||||
if (show) {
|
||||
// fix
|
||||
$(".sidebar").addClass("sticky");
|
||||
} else {
|
||||
// unfix
|
||||
$(".sidebar").removeClass("sticky");
|
||||
}
|
||||
};
|
||||
|
||||
stickySideBar();
|
||||
|
||||
$(window).resize(function() {
|
||||
stickySideBar();
|
||||
});
|
||||
|
||||
// Follow menu drop down
|
||||
$(".author__urls-wrapper button").on("click", function() {
|
||||
$(".author__urls").toggleClass("is--visible");
|
||||
|
10
assets/js/main.min.js
vendored
10
assets/js/main.min.js
vendored
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user