A Site Dedicated to all enthusiasts of Classic Style Banjo
My Web developer sent me an email, but I don't read the language. Anyone got a clue what he is talking about?
I load a specific Javascript library (a file called jQuery) from the Google servers, which simplifies programming special effects -> I use it to make the sliding gallery etc.. I load a specific version of the jQuery library so that future changes to the library itself don't break the websites it is used on. In this case though, Google updated the library anyway to include a bugfix for a specific Javascript feature called 'attribute selectors'. I use attribute selectors to automatically load the correct icons for your downloadable resources; zip files get a zip icon, pdfs get a pdf icon etc..
Unfortunately, I had written the code for the attribute selectors in a deprecated way, which stopped working as soon as the library got updated.
In the end, I had to change the following lines in the "Custom Code" section of the Ning page from this:
downloads.find("a[href$=.pdf]").addClass('pdf');
downloads.find("a[href$=.zip]").addClass('zip');
downloads.find("a[href$=.jpg]").addClass('jpg');
downloads.find("a[href$=.mp3]").addClass('mp3');
downloads.find("a[href$=.wma]").addClass('wma');
... into this:
downloads.find('a[href$=".pdf"]').addClass('pdf');
downloads.find('a[href$=".zip"]').addClass('zip');
downloads.find('a[href$=".jpg"]').addClass('jpg');
downloads.find('a[href$=".mp3"]').addClass('mp3');
downloads.find('a[href$=".wma"]').addClass('wma');
Tags:
Oh my goodness, do we get a prize for spotting the difference ? : )
Thank you Ian for getting the lesson page up and running again.
I'm no expert but I think he is saying he wrote the code using an 'old' version of JavaScript which is no longer supported. When Google (?) upgraded their server it didn't recognise that bit of code. If you look at the examples he's given, their are slight differences in the positions of quote marks and brackets. Programming languages are very pedantic :-) Trevor
© 2025 Created by thereallyniceman. Powered by