Sorry guys , need to bring my old question back from the dead as Ive tried to get back into doing jquery – Im not sure if Im linking it wrong in my html side or what.
my Jquery is
$(document).ready(function() {
if (navigator.appVersion.indexOf("Win") != -1) {
// Computers runs windows
$("a[href$='.pdf']").each(function() {
this.href = this.href.replace("Volumes", "KP01DS0194TG");
});
}
if (navigator.appVersion.indexOf("Mac") != -1) {
// computer is a Mac
$("a[href$='.pdf']").each(function() {
this.href = this.href.replace("KP01DS0194TG", "Volumes");
});
}
});
Ive completely taken the linking out from my html , I pretty much scrapped it.
On Jsfiddle this coding with my html works PERFECTLY not a single hitch .
however when I linked it to my html it would not change.
so if you could please give me some tips – how do I go about linking my file called “jsquery.js” to the html – is that also all I need to link or is there something else (because I read the Jquery website and it said about downloading something from there but it went completely over my head) but yeah help would be amazing!
EDIT: http://jsfiddle.net/KJdjS/12/ Thats the link
Ninja Edit : when ever I change my html links in my index file to 3 “///” it will not work – it gives me an error , as dreamweaver automatically changes it to 5 “/////” when I add the link – but it auto changes to 2 “//” when I click on the link but on the mac side I need 3 “///”
If your codes are in
jsquery.jsfile load the files in this order.