Ok I’m stuck. I am using opencart, and I have added the jquery zoom plugin so that the images can be magnified.
Since doing this it is now conflicting with the menu, I cant figure out what to do?
Is there any sort of way of setting a sort order of the jquery on the page. I have tried the JQuery topZIndex plugin but this failed to work.
PS: I am using the z-index in the css also.
I have tried:
#menu > ul > li {
position: relative; i also tried absolute
float: left;
z-index: 100;
}
For the jqzoom I am using:
$(function() {
var options =
{
zoomType: 'innerzoom',
zoomWidth: 800,
zoomHeight: 400,
showEffect:'fadeout',
hideEffect:'fadeout',
fadeoutSpeed: 'slow',
preloadImages: 'true',
preloadText: 'Loading...'
}
$(".jqzoom").jqzoom(options);
});
My problem is that the dropdown menu should go over the jqzoom image, however the drop down menu appears behind the jqzoom image. I was wondering if there is a means to set a z-index to jquery to set it to the back or something?
I have tried playing with the topZIndex() jquery plugin and used $(".jqzoom").topZIndex( { increment: 0 } ); and $(".jqzoom").topZIndex( { increment: 100 } );
The javascript for the menu is:
$('#menu ul > li > a + div').each(function(index, element) {
// IE6 & IE7 Fixes
if ($.browser.msie && ($.browser.version == 7 || $.browser.version == 6)) {
var category = $(element).find('a');
var columns = $(element).find('ul').length;
$(element).css('width', (columns * 143) + 'px');
$(element).find('ul').css('float', 'left');
}
var menu = $('#menu').offset();
var dropdown = $(this).parent().offset();
i = (dropdown.left + $(this).outerWidth()) - (menu.left + $('#menu').outerWidth());
if (i > 0) {
$(this).css('margin-left', '-' + (i + 5) + 'px');
}
});
// IE6 & IE7 Fixes
if ($.browser.msie) {
if ($.browser.version <= 6) {
$('#column-left + #column-right + #content, #column-left + #content').css('margin-left', '195px');
$('#column-right + #content').css('margin-right', '195px');
$('.box-category ul li a.active + ul').css('display', 'block');
}
if ($.browser.version <= 7) {
$('#menu > ul > li').bind('mouseover', function() {
$(this).addClass('active');
});
$('#menu > ul > li').bind('mouseout', function() {
$(this).removeClass('active');
});
}
}
$('.success img, .warning img, .attention img, .information img').live('click', function() {
$(this).parent().fadeOut('slow', function() {
$(this).remove();
});
});
});
Browsing through the jqzoom source code, the zoom popup window has a z-index of 5001. You need to set your dropdown to something higher than that.