I wonder if it's possible to check whether an element is sticky already, or not?
Here's my code at the moment:
function resize(){
//Check window size
if ( $(window).width() >= 1024) {
// I want to do this here:
// If (element) is sticky, i want to update the height : $('header.navigation').sticky('update');
//Else: If there is no sticky I want to add it
$('header.navigation').sticky();
} else {
$('header.navigation').unstick();
}
}
$(document).ready(function(){
resize();
$(window).resize(resize);
});
Hi!
I wonder if it's possible to check whether an element is sticky already, or not?
Here's my code at the moment: