Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

JQuery - Fancybox - onShow() problem ...

Status
Not open for further replies.

southbeach

Programmer
Jan 22, 2008
879
US
My objective is to resize the fancybox-iframe to match its content. The rendered page may be as little as 500px high and as much as ####px high.

I do not want two vertical scroll bar - I am trying to get the iframe to expand according to its content. This is what I have which is NOT working for me
Code:
        $.fancybox({
            type                : 'iframe',
            href                : url,
            afterClose          : exitfbox,
            closeClick          : false,
            modal               : false,
            fitToView           : false,
            autoSize            : false,
            width               : bwidth,
            height              : bheight,
            helpers             : {
            overlay             : { closeClick: false, }
                        }
afterShow: function()
        {
        $('.fancybox-iframe').load(
         function()
         { $('.fancybox-inner').height($(this).contents().find('body').height()+30); }
        );
        }

        });

I added the portion of code
Code:
afterShow: function()
        {
        $('.fancybox-iframe').load(
         function()
         { $('.fancybox-inner').height($(this).contents().find('body').height()+30); }
        );
        }

        });

after much google search but I am getting the error
Code:
SyntaxError: missing } after property list
	

afterShow: function() { $('.fancybox-iframe').load(function(

This error, of course, breaks my page in more than one way :-(


I have looked at this for two hours and I cannot see the missing bracket. Can you?

Thank you all in advance for your assistance!




--
SouthBeach
The good thing about not knowing is the opportunity to learn - Yours truly, 2008.
 
Two typos:
(1) onShow() -> should had been afterShow()
(2) break -> should had been brake

Sorry!!!

--
SouthBeach
The good thing about not knowing is the opportunity to learn - Yours truly, 2008.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top