Andy Nightingale Andy Nightingale - 1 year ago 99
jQuery Question

external javascript not working on subdomain

I'm working on a dev site using isotope on a subdomain and ran into an issue where the javascript isn't working (previews fine in Dreamweaver Live mode), so I created two simple test pages to see what the issue is.

Internal jQuery working:

External jQuery not working

I thought it might be a path issue on the subdomain, but the CSS file works fine on both. I can't honestly see where the problem lies and I'm not new to building websites... only this server (WHM cPanel), so maybe it's something there?

Answer Source

test.js is just one line of comment... it does nothing.

It looks like this:

// JavaScript Document$(document).ready(function(){ "use strict";  $("button").click(function(){    $(".box").slideToggle();  });});

No new line between comment and real code.