[jQuery] Re: Jquery does not work in IE8
Dear Karl,
Thank you for your reply. I tried moving the jquery scripts before
everything else, but it seems to have no effect in IE.
I moved it back, and this is what it looks like now. (This all works
fine in Safari 4.0.4). Do you have any other suggestions?! Sorry, but
as you can tell, I find this stuff very hard to understand! Jurgen :-)
<html><head>
<title>Dreams Gallery</title>
<base target="detail">
<script language="JavaScript">
// Checks the browser and adds classes to the body to reflect it.
$(document).ready(function(){
var userAgent = navigator.userAgent.toLowerCase();
$.browser.chrome = /chrome/.test(navigator.userAgent.toLowerCase
());
// Is this a version of IE?
if($.browser.msie){
$('body').addClass('browserIE');
// Add the version number
$('body').addClass('browserIE' + $.browser.version.substring
(0,1));
}
// Is this a version of Chrome?
if($.browser.chrome){
$('body').addClass('browserChrome');
//Add the version number
userAgent = userAgent.substring(userAgent.indexOf('chrome/')
+7);
userAgent = userAgent.substring(0,1);
$('body').addClass('browserChrome' + userAgent);
// If it is chrome then jQuery thinks it's safari so we have
to tell it it isn't
$.browser.safari = false;
}
// Is this a version of Safari?
if($.browser.safari){
$('body').addClass('browserSafari');
// Add the version number
userAgent = userAgent.substring(userAgent.indexOf('version/')
+8);
userAgent = userAgent.substring(0,1);
$('body').addClass('browserSafari' + userAgent);
}
// Is this a version of Mozilla?
if($.browser.mozilla){
//Is it Firefox?
if(navigator.userAgent.toLowerCase().indexOf('firefox') != -1)
{
$('body').addClass('browserFirefox');
// Add the version number
userAgent = userAgent.substring(userAgent.indexOf
('firefox/') +8);
userAgent = userAgent.substring(0,1);
$('body').addClass('browserFirefox' + userAgent);
}
// If not then it must be another Mozilla
else{
$('body').addClass('browserMozilla');
}
}
// Is this a version of Opera?
if($.browser.opera){
$('body').addClass('browserOpera');
}
});
<!--
function na_preload_img()
{
var img_list = na_preload_img.arguments;
if (document.preloadlist == null)
document.preloadlist = new Array();
var top = document.preloadlist.length;
for (var i=0; i < img_list.length; i++) {
document.preloadlist[top+i] = new Image;
document.preloadlist[top+i].src = img_list[i+1];
}
}
function na_change_img_src(name, nsdoc, rpath, preload)
{
var img = eval((navigator.appName.indexOf('Netscape', 0) != -1) ?
nsdoc+'.'+name : 'document.all.'+name);
if (name == '')
return;
if (img) {
img.altsrc = img.src;
img.src = rpath;
}
}
function na_restore_img_src(name, nsdoc)
{
var img = eval((navigator.appName.indexOf('Netscape', 0) != -1) ?
nsdoc+'.'+name : 'document.all.'+name);
if (name == '')
return;
if (img && img.altsrc) {
img.src = img.altsrc;
img.altsrc = null;
}
}
// -->
</script>
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1"><style type="text/css">
<!--
body {
background-color: #000000;
}
-->
</style></head>
<title>jCarousel</title>
<link rel="stylesheet" type="text/css" href="Scripts/style.css" />
<script type="text/javascript" src="Scripts/js/jquery-1.3.2.min.js"></
script>
<script type="text/javascript" src="Scripts/js/
jcarousellite_1.0.1.pack.js"></script>
<script type="text/javascript" src="Scripts/js/captify.tiny.js"></
script>
<script type="text/javascript">
//jCarouselLite
$(function() {
$(".slider").jCarouselLite({
btnNext: ".next",
btnPrev: ".prev",
visible: 8
});
});
//Captify
$(document).ready(function(){
$('img.captify').captify({
// all of these options are... optional
// speed of the mouseover effect
speedOver: 'fast',
// speed of the mouseout effect
speedOut: 'normal',
// how long to delay the hiding of the caption after mouseout (ms)
hideDelay: 500,
// 'fade', 'slide', 'always-on'
animation: 'slide',
// text/html to be placed at the beginning of every caption
prefix: '',
// opacity of the caption on mouse over
opacity: '0.7',
// the name of the CSS class to apply to the caption box
className: 'caption-bottom',
// position of the caption (top or bottom)
position: 'bottom',
// caption span % of the image
spanWidth: '100%'
});
});
</script>
</head>
<body>
<div id="list">
<div class="prev"><img src="Scripts/images/prev.jpg" alt="prev" /></
div>
<div class="slider">
<ul>
<li><a href="Gallery%20Dreams/Perchance%20Desc.htm" title="Perchance
to Dream" target="detail"><img src="Gallery Dreams/Perchance to Dream
Thumb.jpg" alt="Perchance to Dream" class="captify" /></a></li>
<li><a href="Gallery%20Dreams/A%20Fleeting%20glimpse%20Desc.htm"
title="A Fleeting Glimpse" target="detail"><img src="Gallery Dreams/A
Fleeting Glimpse Thumb.jpg" alt="A Fleeting Glimpse" class="captify" /
></a></li>
<li><a href="Gallery%20Dreams/Dancing%20in%20the%20Sand%20Desc.htm"
target="detail" title="Dancing in the Sand"><img src="Gallery Dreams/
Dancing in the Sand Thumb.jpg" alt="Dancing in the Sand"
class="captify" /></a></li>
<li><a href="Gallery%20Dreams/Summer%20Shade%20Desc.htm"
target="detail" title="Summer Shade"><img src="Gallery Dreams/Summer
Shade Thumb.jpg" alt="Summer Shade" class="captify" /></a></li>
<li><a href="Gallery%20Dreams/Quasar%20Desc.htm" target="detail"
title="Quasar"><img src="Gallery Dreams/Quasar Thumb.jpg" alt="Quasar"
class="captify" /></a></li>
<li><a href="Gallery%20Dreams/Luminescence%20Desc.htm" target="detail"
title="Luminescence"><img src="Gallery Dreams/Luminescence Thumb.jpg"
alt="Luminescence" class="captify" /></a></li>
<li><a href="Gallery%20Dreams/Singularity%20Desc.htm" target="detail"
title="Singularity"><img src="Gallery Dreams/Singularity Thumb.jpg"
alt="Singularity" class="captify" /></a></li>
<li><a href="Gallery%20Dreams/Celestial%20Desc.htm" target="detail"
title="Celestial"><img src="Gallery Dreams/Celestial Thumb.jpg"
alt="Celestial" class="captify" /></a></li>
<li><a href="Gallery%20Dreams/Starstruck%20Desc.htm" target="detail"
title="Starstruck"><img src="Gallery Dreams/Starstruck Thumb.jpg"
alt="Starstruck" class="captify" /></a></li>
<li><a href="Gallery%20Dreams/Symphony%20Desc.htm" target="detail"
title="Symphony"><img src="Gallery Dreams/Symphony Thumb.jpg"
alt="Symphony" class="captify" /></a></li>
<li><a href="Gallery%20Dreams/Fusion%20Desc.htm" target="detail"
title="Fusion"><img src="Gallery Dreams/Fusion Thumb.jpg" alt="Fusion"
class="captify" /></a></li>
<li><a href="Gallery%20Dreams/Resonance%20Desc.htm" target="detail"
title="Resonance"><img src="Gallery Dreams/Resonance Thumb.jpg"
alt="Resonance" class="captify" /></a></li>
<li><a href="Gallery%20Dreams/Chaos%20Theory%20Desc.htm"
target="detail" title="Chaos Theory"><img src="Gallery Dreams/Chaos
Theory Thumb.jpg" alt="Chaos Theory" class="captify" /></a></li>
<li><a href="Gallery%20Dreams/Cool%20Stream%20Desc.htm"
target="detail" title="Cool Stream"><img src="Gallery Dreams/Cool
Stream Thumb.jpg" alt="Cool Stream" class="captify" /></a></li>
<li><a href="Gallery%20Dreams/The%20Seducer%20Desc.htm"
target="detail" title="The Seducer"><img src="Gallery Dreams/The
Seducer Thumb.jpg" alt="The Seducer" class="captify" /></a></li>
<li><a href="Gallery%20Dreams/Irresistible%20Desc.htm" target="detail"
title="Irresistible"><img src="Gallery Dreams/Irresistible Thumb.jpg"
alt="Irresistible" class="captify" /></a></li>
<li><a href="Gallery%20Dreams/Aurora%20Desc.htm" target="detail"
title="Aurora"><img src="Gallery Dreams/Aurora Thumb.jpg" alt="Aurora"
class="captify" /></a></li>
<li><a href="Gallery%20Dreams/CAT%20Desc.htm" target="detail"
title="Clear Air Turbulence"><img src="Gallery Dreams/Clear Air
Turbulence Thumb.jpg" alt="Clear Air Turbulence" class="captify" /></
a></li>
<li><a href="Gallery%20Dreams/Spark%20Desc.htm" target="detail"
title="Spark"><img src="Gallery Dreams/Spark Thumb.jpg" alt="Spark"
class="captify" /></a></li>
<li><a href="Gallery%20Dreams/Vortex%20Desc.htm" target="detail"
title="Vortex"><img src="Gallery Dreams/Vortex Thumb.jpg" alt="Vortex"
class="captify" /></a></li>
<li><a href="Gallery%20Dreams/The%20First%20Step%20Desc.htm"
target="detail" title="The First Step"><img src="Gallery Dreams/The
First Step Thumb.jpg" alt="The First Step" class="captify" /></a></
li>
<li><a href="Gallery%20Dreams/Free%20Fall%20Desc.htm" target="detail"
title="Free Fall"><img src="Gallery Dreams/Free Fall Thumb.jpg"
alt="Free Fall" class="captify" /></a></li>
<li><a href="Gallery%20Dreams/Heat%20Wave%20Desc.htm" target="detail"
title="Heat Wave"><img src="Gallery Dreams/Heat Wave Thumb.jpg"
alt="Heat Wave" class="captify" /></a></li>
<li><a href="Gallery%20Dreams/Mirage%20Desc.htm" target="detail"
title="Mirage"><img src="Gallery Dreams/Mirage Thumb.jpg" alt="Mirage"
class="captify" /></a></li>
<li><a href="Gallery%20Dreams/Life%20Force%20Desc.htm" target="detail"
title="Life Force (Triptych)"><img src="Gallery Dreams/Life Force
Thumb.jpg" alt="Life Force Triptych" class="captify" /></a></li>
<li><img src="Gallery Form/Repeat Thumb BW.jpg" alt="Repeat"
class="captify" /></li>
</ul>
</div>
<div class="next"><img src="Scripts/images/next.jpg" alt="next" /></
div>
</div>
<div align="center"></div>
</body>
</html>
On Dec 17, 3:33 pm, Karl Swedberg <k...@englishrules.com> wrote:
> If I view source on the detail frame, I see that you're referring to
> the $ function before you load the jQuery file. Put the script element
> that loads jQuery before your other script and see if that helps.
>
> --Karl
>
> ____________
> Karl Swedbergwww.englishrules.comwww.learningjquery.com
>
> On Dec 17, 2009, at 4:26 AM, blueshift wrote:
>
>
>
> > Jquery-1.3.2. runs fine in Safari and Firefox. In IE8 (using the
> > Developer Tools), I get the error: "Could not get the position
> > property. Invalid argument jquery-1.3.2.js, line 12 character 12949".
> > Using debugging, the script highlights the characters {J[G]=K}.
>
> > I have no idea what this does, but it seems to cause the problem! The
> > result is when a thumbnail image is clicked in one of my galleries,
> > the image does not open in IE8. If anyone understands this or how to
> > correct it, I'd be very grateful!
>
> > See the problem in action (or not) on my website:www.blueshiftgallery.com
> > (click on a gallery to open the thumbnails).
>
> > Many thanks!
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home