jQuery problem
-
Hello everyone!
This is not really related to how wp files work, but rather to directory structure of WordPress installation.
I created a simple html file (independent of WordPress) inside wp-content folder to test jQuery scripts that I am working on. I am using<script type="text/javascript" scr="jquery-whatever-version.js"></script> <script type="text/javascript" scr="blabla.js"></script>
inside <head> tags of my file to load the script. These scripts won’t load.
However, the same file gives the expected results if copied to the home folder of WordPress. Both jQuery library and the script itself I am loading are copied along with this file to the same location.
So I suppose there must be some magic that makes every folder beside home restrict script loading.
But why? Can you explain what is going on? It doesn’t influence my work anyhow, it is just a test file for learning how jQuery works. I also have been choosing whether to post this in WP forum or jQuery forum, and decided to choose the first one, since not everyone in jQuery community knows WordPress.
Thanks for your answers.
- The topic ‘jQuery problem’ is closed to new replies.