ComputerWolf / SlickNav

Responsive Mobile Menu Plugin for jQuery
MIT License
939 stars 314 forks source link

Brand adds </img> tag #104

Closed amichel86 closed 8 years ago

amichel86 commented 9 years ago

When you add an img tag to the brand parameter it adds a closing "/img" tag like so. This is invalid markup, just wanted to let you know. :) slicknav

dannyliamho commented 8 years ago

I've been trying to look for a solution to this too, but to no avail. I hope @ComputerWolf will be able to resolve this issue.

amichel86 commented 8 years ago

A year has Gone by and no updates on this hehe

ComputerWolf commented 8 years ago

@liamhawk @amichel86 I am unable to replicate this issue in both Chrome and IE. Could you please create a jsfiddle or similar demonstrating the issue?

amichel86 commented 8 years ago

@ComputerWolf here's the JS code, and then you inspect the brand.

$('#main-nav ul').slicknav({ label: '', brand: '<a href="index.html"><img src="img/logo.png" alt="Microsoft Ignite" title="Microsoft Ignite" /></a>' });

ComputerWolf commented 8 years ago

@amichel86 @liamhawk I think that the dev tools in whatever browser you are using is simply showing the closing tag. If you take a look at this pen in IE or FF and inspect the image, you will see the closing tag http://codepen.io/ComputerWolf/pen/vXXpJg.

However, if you actually view the source it is not present. It seems like Chrome's inspection tool reflects it slightly better, but still does not include the ending slash. The dev tools are simply representing the DOM and not necessarily the exact code.

amichel86 commented 8 years ago

@ComputerWolf looks like you're right. I was checking in Firefox (it adds the </img>) and in Chrome it doesn't!