Skip to content
Snippets Groups Projects
Commit 17643f3d authored by Alberto Siles's avatar Alberto Siles
Browse files

Issue #3037969 by Morbus Iff: Should we remove affix from Bootstrap Barrio?

parent cf425cf5
No related branches found
No related tags found
No related merge requests found
......@@ -29,28 +29,6 @@
position = scroll;
});
var toggleAffix = function(affixElement, scrollElement, wrapper) {
var height = affixElement.outerHeight(),
top = wrapper.offset().top;
if (scrollElement.scrollTop() >= top){
wrapper.height(height);
affixElement.addClass("affix");
}
else {
affixElement.removeClass("affix");
wrapper.height('auto');
}
};
$('[data-toggle="affix"]').each(function() {
var ele = $(this),
wrapper = $('<div></div>');
ele.before(wrapper);
$(window).on('scroll resize', function() {
toggleAffix(ele, $(this), wrapper);
});
// init
toggleAffix(ele, $(window), wrapper);
});
}
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment