I’m trying to get two different heights from my fancybox depending on which link the client clicks on, but for some reason the height just keeps going to 100%. It’s not going to the height I’m wanting
This is my code
$('.fancyboxhd').fancybox({
width: 1287,
height: 720
});
$('.fancyboxsd').fancybox({
width: 640,
height: 360,
});
It’s an iFrame content
(see edit below for an improved answer)
For iframe content, your html should look like
then add these two options to your scripts
so your scripts should look like
### EDIT ### : (Sep 05, 2013)
The code can be improved and simplified using (HTML5)
data-*attributes in the anchors and the sameclassfor both options like :HTML
JS
See JSFIDDLE
NOTE: At the time of this edit, demo used fancybox v2.1.5.