jQuery wont load. I’m a noob. Tried many things, various syntax tweaks. heres how it stands…
Using jQuery on my hard drive, current version jquery-1.7.1 (also tried v1.7.1.min).
have tried to use the following plugins
1) .scrollTo-1.4.2-min
2) .jqDock.min & jquery.jqDock
3) .jtruncate(current) & jquery.jtruncate.pack
Am using IE8 and Chrome to check on local.
Debugging says…
(jquery-1.7.1.js) invalid character Line 1 (NB: line 1 is just the
beginning of the credit info greyed out text /*! )
(jquery.jtruncate.js) jQuery is undefined Line 1 (NB: line 1 is
(function(jQuery){ ) (my page name) Object doesnt support this
property or method Code 0 Line 17 Char 5 (NB: line 17 is $(”).jTruncate({ )
My head code…
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Cressida Haughton - Artist Statement and Biography</title>
<meta name="description" content="Cressida Haughton - Artist Statement and Biography">
<meta name="keywords" content="Cressida Haughton,Lab Rat Orchestra,installation,contemporary artist,Coventry,Midlands,Cressida,">
<link href="_css/maintest2.css" rel="stylesheet" type="text/css" />
<script src="/_js/jquery-1.7.1.js" type="text/javascript" ></script>
<script src="_js/jquery.jtruncate.js" type="text/javascript" ></script>
<script>window.jQuery || document.write("<script src='_js/jquery-1.7.1.min.js'>\x3C/script>")</script>
<script type="text/javascript">
$(document).ready(function(){
$('<div id="statement" />').jTruncate({
length: 200,
minTrail: 0,
moreText: "[more]",
lessText: "[less]",
ellipsisText: "(truncated)",
moreAni: "fast",
lessAni: 2000
});
});
Then theres some java generated by Dreamweaver, (Rollover image/swap image guff), then page specific CSS (see below) i also have site wide external css sheet.
#statement {
position:absolute;
left:285px;
right: 190px;
top:130px;
width: 607px;
height: 321px;
}
Then html body.
Can anyone help?
Have just tried the following and it appears to work ok (Chrome), I am by no means an expert in jQuery but this line
does not look write to me, I have commented where I have changed it, look at http://www.w3schools.com/jquery/jquery_ref_selectors.asp or more info.
Hope this helps, merry christmas 🙂