jQuery and url re-write
I am having a wierd error and jQuery not working depending on how the url is written.
if the url is
/index.cfm?show=about-us
all is good. BUT if the url is
/index.cfm/开发者_如何转开发show_about-us
jQuery doesn't seem to load correctly and I get a "$ is not defined" error in fireBug
I can't use the standard ?= query string I need to be able to use the re-write method.
Any ideas are appriciated Lance
What does your <script src="...">
say? I have a feeling it's looking for /index.cfm/jquery.js
which doesn't exist.
Sorry this was a reference issue to the files. Evendently in that re-write sytle the dom is still trying to navigate the file system starting in the /show_about-us/ directory which isn't truely a directory.
That's it. @recursive got it in one.
Consider using the absolute path from the root of your domain in src attributes. For example: <script src="/jquery.js">
精彩评论