Trying to add some prepend code to a SlickNav menu and while basic HTML works, once I add things like img's and href's, the code fails. I know this is incorrect, but I'm wondering what would work here:
jQuery('.slicknav_menu').prepend('<div class=\"logo\"><a href=\"https://example.com/\" rel=\"home\"><img src=\"https://example.com/images/logo-round.svg\" alt=\"My Site\" onerror=\"this.onerror=null; this.src='https://example.com/images/logo-round.png'\"></a></div>');
I know this will work:
jQuery('.slicknav_menu').prepend('<div class=\"logo\">LOGO</div>');
But the other is more advanced. So how can I make that work so it displays the svg (or png) image?