So I created a simple slideshow with jquery and jquery ui. It works perfectly when I dragged the html into chrome, but when I uploaded the file to my server, the effect didn't work.
You can see the website on -guyzyl.org- (its the main page), or just the html file (which is the same as the one on the site -https://www.dropbox.com/s/0q3tnshbvmxu9ax/index.html-
any help is appreciated, and thanks in advance.
You are missing all these js .. (Seen in firebug in console error)
"NetworkError: 403 Forbidden - http://jqueryui.com/latest/ui/jquery.effects.core.js"
jquery...core.js
"NetworkError: 403 Forbidden - http://jqueryui.com/latest/ui/jquery.effects.slide.js"
jquery...lide.js
error: "NetworkError: 403 Forbidden - http://jqueryui.com/latest/ui/jquery.effects.slide.js"
Also . i would suggest you to read from google CDN ( this jquery ui contains all the effect files)
https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.18/jquery-ui.min.js
While keeping a local copy of it, so that in case it is not able to get it from google cdn , it can look in local path .(as in your case and doesn't brake your website)
Nothing is wrong with the code itself: http://jsfiddle.net/ya8Yu/ is all of your code working.
you need to get your included files setup properly as Fidrizers suggested.
Also, in the future set up a jsfiddle so that we dont have to run around to gather all of your code and set up an environment to test.
Related
I saw some previous topics related to this but was unable to find a related solution.
On my WordPress blog, WeLearnChess.com, I created a custom 403 error page, and now I am getting a seemingly related syntax error in Chrome. I enabled script debugging in the wp config file and checked with developer tools in Chrome, and I get this error:
Uncaught SyntaxError: Unexpected token < inaccessible:1
This appears to refer to my custom 403 page (http://www.welearnchess.com/inaccessible/). I have BulletProof Security Pro installed, so, to create the custom 403, I replaced the default 403 code with the following line of code via the BPS custom code field:
ErrorDocument 403 http://www.welearnchess.com/inaccessible/
From various tutorials that I saw online, this seems like it should be correct, but I'm new to this so perhaps I've made a mistake that is causing the error. Another interesting point is that, after a hard browser refresh, sometimes the syntax error temporarily changes from :inaccessible to :index or maybe it was:index1 (I'm having trouble reproducing it now).
So, have I done something incorrect with my 403 custom code that could be causing the aforementioned error? Thanks in advance for any assistance you can provide, and please let me know if I need to clarify the question further.
You plugin directory is throwing a 403 error, which means when including <script> tags with src like http://www.welearnchess.com/wp-content/plugins/ultimate-social-deux/public/assets/js/min/us.script-min.js?ver=6.0.4 get redirected to your custom 403 page which is http://www.welearnchess.com/inaccessible/. There are a few instances of this for plugins: ultimate-social-deux, zf-wordpress-category-accordian, rain - where their assets that should be publicly accessible are 403ing. Which means, instead of the actual script your custom page is loaded in the script tag, which is as expected, is invalid JavaScript and hence the errors in your console.
I layout'd a page and on my server which is it hostgator works extremely fine, using the jQuery mobile components:
http://brunolustro.com/roger/teste/cadastro.html
But my friend who is programming the page wanted me to insert the newest CDNs from either jQuery and jQuery Mobile:
And this is what the page looks like when I insert those codes:
http://brunolustro.com/roger/test/cadastro.html
Do you know how to fix this?
Regards,
Bruno
When working with JavaScript or jQuery on your website - if something isn't working as you intend - the first thing you should do is check the browser console to see if anything is being logged there.
To check the browser console:
Hit F12 on your keyboard. When the developer tools open, choose the console tab, its placed in the toolbar at the top of the new window.
In the console you will see a few errors in red with error codes (404). A 404 means the requested file wasn't found.
This tells us that your reference to jQuery isn't correct. This could be because the file path you've written isn't correct, or that you haven't deployed those files correctly to your site.
Check your file paths you've referenced and make sure the file is on your server. Once both are correct - the errors should go away.
Here's a link to view more about developer tools: https://developer.chrome.com/devtools#console
Check following files in your "test/js" and "teste/js" folders, because i've got 404 not found error:
jquery-2.0.3.min.js
modernizr-2.6.2.min.js
jquery.mobile-1.4.5.min.map
I'm trying to use jQuery. From jQuery Waypoints I downloaded the example shortcut for infinite scroll. When I checked the web console it gives the following error when it hits the end of the page.
XMLHttpRequest cannot load file:///Users/akash.bansal/Downloads/imakewebthings-jquery-waypoints-415eb55/shortcuts/infinite-scroll/. Received an invalid response. Origin 'null' is therefore not allowed access.`
Edit
Well, that error came because I was accessing a file from a file which got resolved when I allowed the file access in Chrome, but the jQuery-infinite scroll is still not working on localhost!!
Apart from opening Chrome and allow access to the file from other files...
An href link says:
<a href=".">
I changed it to the absolute path. It's working fine for me.
On the following site : http://www.cefod.org/legitchad/web there are a lot of javascript (jquery, jquery-ui).
Everything is working offline, but when the website is online, no more script is working.
It seems there are no problem with the tags, since you can read them by clicking on the links in the page's source.
So, what is the problem ?
I get 2 error messages when running you site through Firebug:
illegal character in jquery-ui.js on line 7199
$.datepicher is undefined in ui-datepicker-fr.js on line 2
Probably has something to do with you problems
Firebug tells me your jquery-ui.js is broken in line 7199.
Looks like an encoding problem. Get a new file from the jquery ui website. Make sure it not get's broken during the upload.
Inside your jquery-ui.js, there is something wrong on line: 7199, I see al lot of characters that can not be found, maybe something went wrong on uploading this file.
What if you try using this URL, just checking if this makes the error, this is not the newest jQueryUI url, but it's the same version as you are using now:
https://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.min.js
your file upload could have messed up,
did you try re-uploading?
because what I see in the file online at the mentioned lines above is "����������������������������������������..."
this could have happened if your transfer stopped and tried to resume
I'm receiving a $ is not a function error. This is new since I updated from 3.2.1.
I have an identical setup working on 3.1.
Have folks run into this issue? I have turned off all plugins and am just attempting to load the superfish (or any jquery) and am receiving this error.
What changed that I'm missing? These are all currently on the same server if that is any help.
thank you,
What happens if you change $ to jQuery? Does that work? $ is simply a variable for the jQuery object. In some setups, you need to use jQuery rather than $.
EDIT
I had the same error, and it was because of jQuery not loaded.
You can this error if your jquery is not loading. To determine if this is the case, you need to debug your webpage network traffic using IE9 -> F12 -> Network -> Capture to see if you get 404 for jQuery files (i.e. something/wp-includes/jquery.js), or use same thing in Firefox's Firebug extension.
You can also search for jquery in page source, it should be in tag, and when you find src (i.e. http://code.jquery.com/jquery-1.6.4.min.js) try open it, if it says 404 not found then you need to place jquery in that file on server (or change whatever php/plugin loads that script tag to correct path)
If you do not know how to do this, please provide link to your wordpress installation.