I am doing Lynda.com JQuery Essential Training by Joe Marini. Chapter 2, Case Study for Annotating Page Links. It is necessary to add a small gif icon next to any links to pages that are .pdf files. I am using jquery-1.10.2.min.js. Following the instructions, the code I typed is:
$("document").ready(function() { $("a[href$=.pdf]").after("<img src='images/small_pdf_icon.gif' align='absbottom' />"); });
which returns this error in the java console in Chrome: Search error: syntax error, unrecognized expression: a [href $ =. pdf] Sorry, could not post a lesson snapshot. No reputation yet.
Am I just typing this wrong? Or could this change as this lesson was done with an earlier version of jquery? Thanks
source share