JQUERY FAIL on x10hosting but Works on Local Server

Status
Not open for further replies.

blastof2

New Member
Messages
4
Reaction score
0
Points
1
In the index file of my site, JQuery loads fine.

Here is the code in the console that validates JQuery has loaded:

if(typeof jQuery !='undefined'){// jQuery is loaded => print the version
alert(jQuery.fn.jquery);}
However, JQuery code fails in that file through x10hosting.com. Yet, when run on a local web server, the JQuery code runs fine.

Site: http://blastoff.x10host.com

A view source reveals the code that should work:

$(function () {
$('#search-text').autocompleter({
source: suggestions,
// marker for autocomplete matches
highlightMatches: true,
// show hint
// hint: true,
// abort source if empty field
empty: false,
});
});​
 

caftpx10

Well-Known Member
Messages
1,534
Reaction score
114
Points
63
Have you looked at the 'network' tab in developer tools (browser tool) to see what response there is when requesting the jQuery file that is hosted under your account?
 

blastof2

New Member
Messages
4
Reaction score
0
Points
1

Have you looked at the 'network' tab in developer tools (browser tool) to see what response there is when requesting the jQuery file that is hosted under your account?

OK. When I look at the capture screenshots, jquery.min.js is there. This is so since it gets loaded by the HTML directive:

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
However, this fails to load:

Yet, it is accessible if you click on the link itself.

And so, the <script></script> embedded in the HTML will fails because it relies upon the external script above.

So the question becomes, why is not that script from rawgit loading?
 

blastof2

New Member
Messages
4
Reaction score
0
Points
1
Have you looked at the 'network' tab in developer tools (browser tool) to see what response there is when requesting the jQuery file that is hosted under your account?

OK. So this is embarrassing but a good lesson for myself and all. It would appear that a browser script blocker was active on the subdomain (blastoff) of the domain x10hosting.com

Removing that fixed all.

Let that be a lesson for anyone!
 
Status
Not open for further replies.
Top