I have a sticky menu/floater bar when a user scrolls down on the page ... using jQuery I add the floater-bar class to the #menu-wrapper.
My goal is to add an image within an anchor at the same time floater-bar class is added so that the logo is on the floater bar as well.
if ($(window).scrollTop() > $header_top_pos) {
$("#menu-wrapper").addClass("floater-bar");
} else {
$("#menu-wrapper").removeClass("floater-bar");
}
I have tried the following:
$("#menu-wrapper").append("<a href="#"><img src="image" /></a>");
Tried .add and .prepend as well
It makes the whole script fail as the floater-bar class no longer gets added into the menu.
\".