views:

64

answers:

2

is there a way to disable right click in fancybox. thanks

+1  A: 

Hello, if you want to disable the right click on image, you need to grab the resultant selector and disable its context menu property.

example :

$('#fancybox-wrap').bind('contextmenu', function() {
    alert('sorry, Right Click Disabled :P'); //do stuff
    return false;
});
Ninja Dude
A: 

Sorry but I don't understand. What I have to change to disable right click for .bild ?

Thanks.

$(document).ready(function() {

$(".bild").fancybox({
'titleShow' : true,
'transitionIn' : 'none',
'transitionOut' : 'none',
'autoScale' : false,
'titlePosition' : 'inside',
'hideOnContentClick': true
});
$("a#inline").fancybox({
'hideOnContentClick': true
});
$(".other").fancybox({
'autoDimensions' : true,
'transitionIn' : 'none',
'transitionOut' : 'none',
'onComplete': function() {$("#fancybox-inner").css({'overflow-x':'hidden'});}, 

'ajax' : {
cache : false
           } 
});
});
guest2