I am very new so be gentle... I would appreciate any help.
My image hover from jloupe works in firefox and safari but is buggy in IE. It won't hover when the page loads but when you browse away and come back it does.
I have an error that I found with firebug on this line but I have no idea how to fix it in my source code
The error seems to be showing up in line 1561 (see below)
if ( !handle ) {
1558
eventHandle = function() {
1559
// Handle the second event of a trigger and when
1560
// an event is called after a page has unloaded
1561
return typeof jQuery !== "undefined" && !jQuery.event.triggered ?
1562
jQuery.event.handle.apply( eventHandle.elem, arguments ) :
HERE ARE MY FILES
I have this is called from my php file.
jquery-1.4.min.js
I also have this jloupe (modified my a php guy)
$(document).ready(function(){
var loupe = {
'width': 200,
'height': 151
},
viewport = {};
$('img.jLoupe').each(function(i){
$(this).attr('id', 'img'+i);
});
$('<div id="thejLoupe"/>')
.addClass('thejLoupe')
.css({
position: 'absolute',
width: loupe.width+'px',
height: loupe.height+'px',
zIndex: 500
})
.hide()
.appendTo('body')
.bind('mouseenter', function(){
if(thumbtimer) clearTimeout(thumbtimer);
})
.bind('mouseleave', function(e){
$('img:visible', this).hide(),
$(this).hide();
});
if($.browser.msie){
$('#thejLoupe').css('background-color', '#FFF');
}else{
$('#thejLoupe').css('background-color', 'rgba(0,0,0,0.25)');
}
$('<div id="zoomWrapper" />').css({
width: (loupe.width - 5)+'px',
height: (loupe.height - 5)+'px',
overflow: 'hidden',
margin: '5px 0px 0px 5px'
}).appendTo('#thejLoupe');
$('.jLoupe').each(function(i){
var offset = $(this).offset(),
dims = {
width: $(this).width(),
height: $(this).height()
},
src = $(this).attr('src'),
lastUnderscore = parseInt((src.lastIndexOf('_')), 0) + 1,
s = src.substr(0, lastUnderscore) + 'lg.jpg',
img = $('<img />')
.bind('load', function(){
var w = this.width || $(this).css('width'),
h = this.height || $(this).css('height');
$(this).data('size',{
'width': parseInt(w, 10),
'height': parseInt(h, 10)
});
})
.attr('src', s)
.addClass('img_lg')
.hide()
.appendTo('#zoomWrapper');
$(this).data('zoom', img);
})
.bind('mouseenter', function(e){
var container = $('#thejLoupe'),
wrapper = $('#zoomWrapper'),
thumb = $(this),
o = thumb.offset(),
img = thumb.data('zoom'),
coords = {
left: parseInt(o.left + thumb.width(), 10),
top: parseInt(o.top, 10)
},
dims = {
'thumb': {
'height': 0,
'width': 0
},
'lg': {
'height': 0,
'width': 0
}
},
max = {},
css = {
'position': 'absolute'
},
scrollOffset = {};
scrollOffset['top'] = $('*').scrollTop();
scrollOffset['left'] = $('*').scrollLeft();
viewport['height'] = $(document.body).height();
viewport['width'] = $(document.body).width();
dims.thumb.height = thumb.height();
dims.thumb.width = thumb.width();
dims.lg.height = img.data('size').height;
dims.lg.width = img.data('size').width;
max['height'] = ((parseInt(coords.top, 10) - scrollOffset.top) + dims.lg.height);
max['width'] = ((parseInt(coords.left, 10) - scrollOffset.left) + dims.lg.width);
if(scrollOffset.left < coords.left){
css['left'] = (max['width'] < viewport.width) ? (coords.left - 20)+'px':((viewport.width - scrollOffset.left) - (dims.lg.width + 20))+'px';
}else{
css['left'] = (Math.abs(coords.left - scrollOffset.left) + coords.left + 20)+'px';
}
if(scrollOffset.top < coords.top){
css['top'] = (max['height'] < viewport.height) ? (coords.top + 20)+'px':((viewport.height - dims.lg.height - 20) + scrollOffset.top)+'px';
}else{
css['top'] = (Math.abs(coords.top - scrollOffset.top) + coords.top + 20)+'px';
}
css['width'] = (dims.lg.width + 10)+'px';
css['height'] = (dims.lg.height + 10)+'px';
wrapper.css({
width: css.width,
height: css.height
});
img.show();
container.css(css).show();
})
.bind('mouseleave', function(e){
var img = $(this).data('zoom'),
container = $('#thejLoupe');
thumbtimer = setTimeout(function(){
img.hide();
container.hide();
}, 10);
});
});
Lastly there is also a thickbox but as far as I can tell there aren't any errors.
I would greatly appreciate any help and would pay to have someone fix this for me.
My site was supposed to launch yesterday and just seeing this error in IE... YIKES