Reputation: 10744
I have a div with a rails 3.1 partial and a link to open the partial in fancybox:
<div id="content">
<%= link_to "Terms of Service", "#terms-use", :class =>"terms-use" %>.
<%= render :partial => "pages/terms" %>
</div>
inside the div has a partial with id terms-use
The link generated by link_to method is:
<a class="terms-use" href="#terms-use">Terms of Service</a>
This is a fancybox javascript that I have:
$(function() {
$("a.terms-use").fancybox({
'titlePosition' : 'inside',
'transitionIn' : 'none',
'transitionOut' : 'none',
'overlayOpacity' : '0',
'autoDimensions' : false,
'width' : 610,
'height' : 130,
'centerOnScroll' : true,
});
});
My fancy box working fine when I open it. But the problem is that when I close the fancy box create into my parent content div a new white or blank div with same heigh that fancy box. Then my parent div content is extended in that height. Its mean adds to the height of content div the heigh of fancybox. The position of this white blank div is relative.
How I can fix this?
Upvotes: 0
Views: 424