fancy box resize image
<li><a href="image-files/chinese-garden-cs01.jpg">
<img alt="Chinese Garden" src="image-files/chinese-garden-cs01.jpg" width="400" height="300" />
<p> Daphnie had a piece of waste ground </p></a></li>
consider the following item in a list. when i click on the item the image opens in a fancy box, however its size remains the same. i want to increase the size of the image. to something like 600px i have tried using the following code, but nothing work开发者_高级运维s
'autoDimension': false,
'width': 600,
'height': 600
'autoScale': false,
'width': 600,
'height': 600
any Ideas ..........
the link is : http://note-builder.com/gig/new%20proline/case-studies.php
HERE IS A WORKING Fiddle..
http://jsfiddle.net/vwake/GZhLy/6/
http://jsfiddle.net/vwake/GZhLy/6/
Try to use onStart
property of fancybox. It takes a callback which will be executed when the fancybox starts loading. Along with this you should make sure the fancybox dimensions are good enough to incorporate the image with height/width 600. Try this
onStart: function(){
$(“img”).attr({
width : 600,
}).removeAttr(‘height’);
},
精彩评论