annontating a link w/an image using jquery.
Hi all was following a tutorial where jquery was ussed to append an image to a link
so for example I have
in the html:
- <ul id="list2">
- <li class="a"><a href="www.google.com"> google</a></li>
- <li class="b"><a href="imgs/logoPH.jpg"> a jpg</a></li>
- <li class="a"><a href="imgs/v2.0_L2_Technology_expanded_dlm01.png"> a png</a></li>
- <li class="c"><a href="apdf.pdf"> item 04</a></li>
- <li class="b"><a href="#anchor1"> anchor link</a></li>
- <li class="c"><a href="apdf.pdf"> item 04</a></li>
- </ul>
and in jquery
- $("document").ready(function(){
- $("a[href$=.pdf]").after("<img src='imgs/smlIcon.jpg' align='absbottom' />");
- $("a[href$=.com]").after("<img src='imgs/smlIcon02.jpg' align='absbottom' />");
- });
it did say for jquery 1.5 & later to use ' instead of " around the.pdf string. i tried that but it did not work.
could I please get some advice on how to make this work?
thank you.