fancybox: change height and width property after
Yes i have a simple fancybox with specified height and width.
When you click a link inside this fancybox it runs a ajax request. On this request´s success, i wish the fancybox to change height an开发者_如何学Pythond width.
Create a div for your ajax, and another to contain it. Have the containing div be fixed height and overflow: hidden
. When the ajax loads run .height()
with jQuery on the inner div, then assign a variable and have the container .animate()
to fit.
A little late but still valid:
$.fancybox.update()
// Auto-sizes fancyBox height to match height of content
or
$.fancybox.toggle()
// If content is resized to fit inside viewport than it will be expanded to full size (and vice verse)
精彩评论