adding an additional link via jquery if the browser is safari
Posted on 2010-08-24
I'm creating a basic mobile template, and would like to add an additional link to my MainNav if the browser is safari (to link to an iPhone specific app) but not have the link appear on any other devices.
Below is the MainNav and I would like <li><a href="#">iPhone App</a></li> to be inserted after the Menu Item 3 li.
<li><a href="#">Menu Item 1</a></li>
<li><a href="#">Menu Item 2</a></li>
<li><a href="#">Menu Item 3</a></li>
Is this possible to do with jquery to detect the browser and then insert the link via last child? Or is there a better way to accomplish this?
Thanks in advance-