jquery.fancybox dimension imagenes
Publicado por oriol (1 intervención) el 16/10/2013 14:47:04
Buenas;
Estoy creando una galeria de imaganes en un joomla que trabaja con un opoup que funciona mediante jquery.fancybox.
http://www.carusa.es/index.php/civit-2
Como podeis ver cuando agrandamos la foto me crea un fullscreen. No necesito eso, quiero que simplemente me aparezca el tipico popup como estos;
http://fancybox.net/
Con margenes arriba y abajo yq ue se adapte a la imagen y se vea la imagen entera. No tengo ni idea de programacion pero tocando tocando he encontrado la linea de codigo donde esta esto( o eso creo) en un default.php;
Me podeis decir si puedo hacer lo que quiero y como?¿?
Gracias. Oriol
Estoy creando una galeria de imaganes en un joomla que trabaja con un opoup que funciona mediante jquery.fancybox.
http://www.carusa.es/index.php/civit-2
Como podeis ver cuando agrandamos la foto me crea un fullscreen. No necesito eso, quiero que simplemente me aparezca el tipico popup como estos;
http://fancybox.net/
Con margenes arriba y abajo yq ue se adapte a la imagen y se vea la imagen entera. No tengo ni idea de programacion pero tocando tocando he encontrado la linea de codigo donde esta esto( o eso creo) en un default.php;
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
// The API will call this function when the page has finished downloading the JavaScript for the player API
function onYouTubePlayerAPIReady() {
// Initialise the fancyBox after the DOM is loaded
jQuery(document).ready(function() {
jQuery(".mfancybox")
.attr(\'rel\', \'gallery\')
.fancybox({
nextEffect : \'none\',
prevEffect : \'none\',
padding : 0,
margin : 0,
mouseWheel : false,
autoCenter : false,
wrapCSS : \'TzWrap\',
beforeShow : function() {
// Find the iframe ID
var id = jQuery.fancybox.inner.find(\'iframe\').attr(\'id\');
// Create video player object and add event listeners
var player = new YT.Player(id, {
height: \'100%\',
width: \'100%\',
playerVars: {
modestbranding: 1,
controls: 0,
autoplay: 0,
rel: 0,
loop: 0,
showinfo: 0,
wmode: \'transparent\'
},
events: {
\'onReady\': onPlayerReady,
\'onStateChange\': onPlayerStateChange
}
});
},
afterLoad : function () {
switch (this.type) {
case \'image\':
jQuery.extend(this, {
aspectRatio : false,
type : \'html\',
width : \'100%\',
height : \'100%\',
content : \'<\div class="fancybox-image" style="background-image:url(\\\'\' + this.href + \'\\\'); background-size: cover; background-position:50% 50%;background-repeat:no-repeat;height:100%;width:100%;" /></div>\'
});
break;
case \'iframe\':
jQuery.extend(this, {
aspectRatio : false,
width : \'100%\',
height : \'100%\'
});
break;
}
}
});
jQuery (window).resize (function () {
//resizeVideo ();
});
});
}</script>
Me podeis decir si puedo hacer lo que quiero y como?¿?
Gracias. Oriol
Valora esta pregunta


0