Upgrade and fancybox no longer works 9 Years ago
|
Karma: 0
|
Hello,
I updated a clients site recently from J3.3 to J3.4. During the upgrade Fancybox was throwing all kinds of errors since it was old and in need of updating as well. I purchased the recent version, uploaded it and everything seemed to update correctly. However now when clicking on a link the fancybox no longer loads. Here is the site in question: meiretail.com/retailsafes/products-for-retailsafes/sc-advance.html
Links to the left link to the module position. Any help would be much appreciated.
|
|
|
|
|
Re:Upgrade and fancybox no longer works 9 Years ago
|
Karma: 760
|
Hello,
This problem with site template. It loads own copy of jQuery library instead of using jQuery library which is loaded by Joomla!. It causes problem with Joomla! javascript code and javascript of 3rd party extension. You can see javascript errors in browser's error console. These errors are not related to fancybox, but they prevent execution of extension's javascript code. Replace the following javascript in site template:
Code: |
<script type="text/javascript" src="/templates/meigaming/js/jquery-1.4.2.min.js"></script>
<script type="text/javascript">
$(function() {
$('.main-nav > li').hover(
function () {
var $this = $(this);
$('img',$this).stop(true,true).animate({
'margin-top':'0px', 'margin-bottom':'-10px'
}, 300);
},
function () {
var $this = $(this);
$('img',$this).stop(true,true).animate({
'margin-top':'20px', 'margin-bottom':'-30px'
}, 300);
}
);
});
$(function() {
$('.products-menu > li').hover(
function () {
var $this = $(this);
$('ul',$this).stop(true,true).animate({
'margin-left':'-150px', 'opacity':'1'
}, 300);
},
function () {
var $this = $(this);
$('ul',$this).stop(true,true).animate({
'margin-left':'500px', 'opacity':'0'
}, 300);
}
);
});
</script>
|
with the following one to fix the problem:
Code: |
<script type="text/javascript">
jQuery(function($) {
$('.main-nav > li').hover(
function () {
var $this = $(this);
$('img',$this).stop(true,true).animate({
'margin-top':'0px', 'margin-bottom':'-10px'
}, 300);
},
function () {
var $this = $(this);
$('img',$this).stop(true,true).animate({
'margin-top':'20px', 'margin-bottom':'-30px'
}, 300);
}
);
});
jQuery(function($) {
$('.products-menu > li').hover(
function () {
var $this = $(this);
$('ul',$this).stop(true,true).animate({
'margin-left':'-150px', 'opacity':'1'
}, 300);
},
function () {
var $this = $(this);
$('ul',$this).stop(true,true).animate({
'margin-left':'500px', 'opacity':'0'
}, 300);
}
);
});
</script>
|
BTW, this code is loaded twice on the page.
Regards,
ARI Soft
|
|
|
|
|
Re:Upgrade and fancybox no longer works 9 Years ago
|
Karma: 0
|
Thanks so much, that fixed the issue!
|
|
|
|
|
|