Home

Geeklog: What I Learnt Today / Adam

Oddity with Javascript name in WordPress

> Came across an oddity with using javascript file in a plain vanilla WordPress install. I was trying to bring in jquery file like so
script src="/js/jquery-1.7.1.js" type="text/javascript"
But all that happened was I got the wordpress 404 page instead I thought hmm quite a lot to myself then drank some more tea and tried
script src="/js/jquery171.js" type="text/javascript
Which works I think its the dots and dashes in the filename which makes the difference. Also tried with
jquery-171.js
and
jquery17.1.js
which didn't work either but
jquery_171.js
did work.
Seems an odd one so just just writing this in case it helps someone else. I was using Wordpress 3.4

/ Adam