[solved] Disable fancybox nav arrows for iframe content
Posted: Sun Jan 09, 2011 5:06 pm
EDIT: Doh! It works, I had quotes on my 'true' and 'false' values, and it's not that good for scripts, huh?
-----
I'd like to use fancybox for website I'm working on, both for Gallery and for iframe content. Controls for images are okay, I just want to get rid of navigation arrows for html content, but I can't find a way to achieve this.
I call fancybox only once, in the head section: JQueryTools component, fancybox-1.3.1.pack.js . I tried to disable navigation by setting showNavArrows to false inside this file, but no luck.
Then there is this script I use for iframe html by adding rel="fancybox" to any link I want as FB window:
But it keeps showing me those arrows on hover anyway, even when I have them disabled here and in js file.
And here's how my fancybox script looks like in Gallery template:
This part works perfect, I mean when I set showNavArrows to false here, it disables controls as it should - but only for my gallery images of course. Can somebody please point out why it's not working same way for my iframe content?
CMSMS version: 1.9.2 Tevairoa
Active modules: JQueryTools 1.0.10 | jQuery 1.1.2 | Gallery 1.4.3 | SimpleSlider 0.3 | SimpleGoogleMap 1.1 | CGExtensions 1.22.1 | Statistics 1.1.0 | FormBuilder 0.6.4 | SEOTools 1.1
-----
I'd like to use fancybox for website I'm working on, both for Gallery and for iframe content. Controls for images are okay, I just want to get rid of navigation arrows for html content, but I can't find a way to achieve this.
I call fancybox only once, in the head section: JQueryTools component, fancybox-1.3.1.pack.js . I tried to disable navigation by setting showNavArrows to false inside this file, but no luck.
Then there is this script I use for iframe html by adding rel="fancybox" to any link I want as FB window:
Code: Select all
<__script__ type="text/javascript">
$(document).ready(function() {
$('a[rel="fancybox"]').fancybox({
'autoScale' : false,
'width' : '50%',
'height' : '90%',
'speedIn' : 500,
'autoScale' : false,
'transitionIn' : 'elastic',
'easingIn' : 'easeOutBack',
'easingOut' : 'easeInBack',
'type' : 'iframe',
'overlayColor': '#000',
'overlayOpacity': 0.5,
'scrolling' : 'auto',
'centerOnScroll' : true,
'showNavArrows' : false,
'onComplete' : function() {
$("#fancybox-wrap").hover(function() {
$("#fancybox-title").show();
}, function() {
$("#fancybox-title").hide();
});
}
});
});
</__script>And here's how my fancybox script looks like in Gallery template:
Code: Select all
<__script__ type="text/javascript">
$(document).ready(function() {
$("a.group").fancybox({
'speedIn': 500,
'speedOut': 500,
'transitionIn' : 'elastic',
'transitionOut' : 'elastic',
'easingIn' : 'easeOutBack',
'easingOut' : 'easeInBack',
'showNavArrows' : true,
'overlayColor': '#000',
'overlayOpacity': 0.5
});
});
</__script>
CMSMS version: 1.9.2 Tevairoa
Active modules: JQueryTools 1.0.10 | jQuery 1.1.2 | Gallery 1.4.3 | SimpleSlider 0.3 | SimpleGoogleMap 1.1 | CGExtensions 1.22.1 | Statistics 1.1.0 | FormBuilder 0.6.4 | SEOTools 1.1