I have a script that assigns data-offset-top and data-offset-bottom to an affixed (bootstrap affix) div. At least this is what I am trying to do. For some reason it does not work... anymore.
Is there something wrong with the code bellow or the issue is from somewhere else?
javascript:
$(document).ready(function(){
var off = $(".navbar-static-top").height() + 80;
var off2 = $("footer").height() + 30;
$(".awrap > div:nth-child(1)").attr('data-offset-top', off.toString(); );
$(".awrap > div:nth-child(1)").attr('data-offset-bottom', off2.toString(); );
$(function() {
var $affixElement = $('div[data-spy="affix"]');
$affixElement.width($affixElement.parent().width());
});
});
Thank you!
;after theoff.toString()andoff2.toString().