Update to Jquery 3.6.0 (#3254)

This commit is contained in:
Lars Olesen
2022-05-27 16:12:25 +02:00
committed by GitHub
parent a499b0dcae
commit df97788050
5 changed files with 992 additions and 118 deletions

View File

@@ -2,16 +2,16 @@
jQuery plugin settings and other scripts
========================================================================== */
$(document).ready(function() {
$(function() {
// FitVids init
$("#main").fitVids();
// Sticky sidebar
var stickySideBar = function() {
var show =
$(".author__urls-wrapper button").length === 0
$(".author__urls-wrapper").find("button").length === 0
? $(window).width() > 1024 // width should match $large Sass variable
: !$(".author__urls-wrapper button").is(":visible");
: !$(".author__urls-wrapper").find("button").is(":visible");
if (show) {
// fix
$(".sidebar").addClass("sticky");
@@ -28,9 +28,9 @@ $(document).ready(function() {
});
// Follow menu drop down
$(".author__urls-wrapper button").on("click", function() {
$(".author__urls-wrapper").find("button").on("click", function() {
$(".author__urls").toggleClass("is--visible");
$(".author__urls-wrapper button").toggleClass("open");
$(".author__urls-wrapper").find("button").toggleClass("open");
});
// Close search screen with Esc key
@@ -49,7 +49,7 @@ $(document).ready(function() {
$(".initial-content").toggleClass("is--hidden");
// set focus on input
setTimeout(function() {
$(".search-content input").focus();
$(".search-content").find("input").focus();
}, 400);
});