php - Jquery failure after site went live -
edit: posted head code edit 2: clarification on php
i have been designing site weeks using jquery. don't have local server or testing server created directory through ftp, '/testing'. working great in testing directory.
i attempted go live tonight moving files in '/testing' root directory , changed file paths , script sources accordingly. site loads, related jquery non-functional. javascript console gives errors of (just example plugin):
'$.os.name' not function
i'm @ loss do. changed paths referencing jquery library, installed fresh copy of jquery (to new directory), etc.
there wordpress installation in different directory '/blog'. i've read compatibility issues wordpress, seems related using jquery inside wordpress, not.
here head code:
<head> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <link href="main.css" rel="stylesheet" type="text/css"> <link href="jquery.lightbox-0.5.css" rel="stylesheet" type="text/css"> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> <script type="text/javascript" src="jq.browser.js"></script> <script type="text/javascript" src="compatible.js"></script> <script type="text/javascript" src="nav.js"></script> <script type="text/javascript" src="jquery.lightbox-0.5.js"></script> <script type="text/javascript"> $(function() { $('a.lightbox').lightbox(); }); </script> <title>pearce images</title> <script type="text/javascript" src="slider.js"></script> <link href="slider.css" rel="stylesheet" type="text/css"> </head>
it's worth noting pages in php. i'm not php developer, use 1 function: require_once('some.file.php'). (sorry no code markup, can't handle on markdown thing). use pull same code header , footer pages, way if changes need made, have change 1 chunk of code.
your appreciated.
start trying download jquery.js file (or whatever it's called) browser. go view source. browsers automatically highlight links can click them. see if jquery.js file loads when visit it. if not, have server configuration issue.
otherwise, create simple html file uses jquery script. if works fine, have isolated problem.
one thing test see if jquery
variable still available. $
might have been changed refer javascript library. if that's case, don't have replace of $s jquerys; can keep code compatible code using other plugins wrapping jquery-using code this:
(function($){ /* code using $ jquery. */ }(jquery));
Comments
Post a Comment