Can't just adjust navbar
's margin-top
?
I'm not using the Sticky
plugin but I've a similar problem and the code below solve.
(function($) {
'use strict';
$(document).ready(function() {
// if adminbar exist (should check for visible?) then add margin to our navbar
var $wpAdminBar = $('#wpadminbar');
if ($wpAdminBar.length) {
$('div.navbar').css('margin-top',$wpAdminBar.height()+'px');
}
});
})(jQuery);