<script type="text/javascript" src="jquery-1.4.2.js"></script>
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre question.fancybox-custom .fancybox-skin {
box-shadow: 0 0 5px #222;
-webkit-box-shadow: 0 0 5px #222;
}
body {
max-width: 100%;
margin: 0 auto;
text-align: center;
}
nav {
text-align: center;
margin-top: 10px;
margin-bottom: 10px;
background-color: #CC6633;
padding-top: 5px;
padding-bottom: 5px;
margin-left: 6px;
}
.button {
background-color: #222;
color: #FFFFFF;
padding-top: 4px;
padding-left: 10px;
padding-bottom: 4px;
border-top-left-radius: 0px;
border-top-right-radius: 0px;
border-bottom-right-radius: 0px;
border-bottom-left-radius: 0px;
border-collapse: separate;
border-spacing: 0px 0px;
border-right-color: #FFFFFF;
border-left-color: #FFFFFF;
border-right-width: 2px;
border-left-width: 2px;
border-right-style: solid;
border-left-style: solid;
font-size: 20px;
line-height: 22px;
padding-right: 10px;
position: static;
font-family: Impact, Haettenschweiler, "Franklin Gothic Bold", "Arial Black", sans-serif;
text-align: center;
margin-top: 20px;
margin-left: -6px;
}
.button:hover {
background-color: #FF6633;
}
a:link {
text-decoration: none;
}
a:visited {
text-decoration: none;
}
a:hover {
text-decoration: none;
}
a:active {
text-decoration: none;
}
.header {
background-color: #CC3300;
position: static;
width: 100%;
height: auto;
}
.full {
width: 100%;
height: auto;
}
.images_vingt-cinq {
width: 50%;
height: auto;
}
.images_vingt-cinq:hover {
background-color: #663333;
}
#main {
position: absolute;
/* [disabled]top:50%; */
cursor: pointer;
right: auto;
left: auto;
}
/*Style des images et application d'une opacité de 40% à chacune d'elles. Notez que les 3 attributs relatifs à cet effet sont nécessaires pour être compatibles avec tous les navigateurs */
#main img {
width: auto;
/* [disabled]height: 150px; */
/* [disabled]z-index: 1; */
filter: alpha(opacity=40);
opacity: 0.4;
-moz-opacity: 0.4
}
<script type="text/javascript">
$(document).ready(function() {
/*
* Simple image gallery. Uses default settings
*/
$('.fancybox').fancybox();
/*
* Different effects
*/
// Change title type, overlay closing speed
$(".fancybox-effects-a").fancybox({
helpers: {
title : {
type : 'outside'
},
overlay : {
speedOut : 0
}
}
});
// Disable opening and closing animations, change title type
$(".fancybox-effects-b").fancybox({
openEffect : 'none',
closeEffect : 'none',
helpers : {
title : {
type : 'over'
}
}
});
// Set custom style, close if clicked, change title type and overlay color
$(".fancybox-effects-c").fancybox({
wrapCSS : 'fancybox-custom',
closeClick : true,
openEffect : 'none',
helpers : {
title : {
type : 'inside'
},
overlay : {
css : {
'background' : 'rgba(238,238,238,0.85)'
}
}
}
});
// Remove padding, set opening and closing animations, close if clicked and disable overlay
$(".fancybox-effects-d").fancybox({
padding: 0,
openEffect : 'elastic',
openSpeed : 150,
closeEffect : 'elastic',
closeSpeed : 150,
closeClick : true,
helpers : {
overlay : null
}
});
/*
* Button helper. Disable animations, hide close button, change title type and content
*/
$('.fancybox-buttons').fancybox({
openEffect : 'none',
closeEffect : 'none',
prevEffect : 'none',
nextEffect : 'none',
closeBtn : false,
helpers : {
title : {
type : 'inside'
},
buttons : {}
},
afterLoad : function() {
this.title = 'Image ' + (this.index + 1) + ' of ' + this.group.length + (this.title ? ' - ' + this.title : '');
}
});
/*
* Thumbnail helper. Disable animations, hide close button, arrows and slide to next gallery item if clicked
*/
$('.fancybox-thumbs').fancybox({
prevEffect : 'none',
nextEffect : 'none',
closeBtn : false,
arrows : false,
nextClick : true,
helpers : {
thumbs : {
width : 50,
height : 50
}
}
});
/*
* Media helper. Group items, disable animations, hide arrows, enable media and button helpers.
*/
$('.fancybox-media')
.attr('rel', 'media-gallery')
.fancybox({
openEffect : 'none',
closeEffect : 'none',
prevEffect : 'none',
nextEffect : 'none',
arrows : false,
helpers : {
media : {},
buttons : {}
}
});
/*
* Open manually
*/
$("#fancybox-manual-a").click(function() {
$.fancybox.open('1_b.jpg');
});
$("#fancybox-manual-b").click(function() {
$.fancybox.open({
href : 'iframe.html',
type : 'iframe',
padding : 5
});
});
$("#fancybox-manual-c").click(function() {
$.fancybox.open([
{
href : '1_b.jpg',
title : 'My title'
}, {
href : '2_b.jpg',
title : '2nd title'
}, {
href : '3_b.jpg'
}
], {
helpers : {
thumbs : {
width: 75,
height: 50
}
}
});
});
});
</script>
<script type="text/javascript">
<script type="text/javascript" src="jquery-1.4.2.js"></script>
<script type="text/javascript" src="jquery-1.4.2.js"></script>>:) Oui, je récupère les effets de fancybox. Par contre, toujours pas d'effet "images éclairées" (la photo reste avec son opacité définie en CSS). Pour info, les JQuery utilisés avec fancybox sont inférieurs à 1.4 (de mémoire _je ne suis pas chez moi_ c'est du JQuery 1.3.2 grand maxi). Bonne journée !
our info, les JQuery utilisés avec fancybox sont inférieurs à 1.4 (de mémoire _je ne suis pas chez moi_ c'est du JQuery 1.3.2 grand maxi).
jQuery.noConflict();présente dans ton second script.
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script> <script type="text/javascript" src="/fancybox/jquery.fancybox-1.3.4.pack.js"></script>