archan937 / topup

The #1 Javascript Pop Up / Lightbox made by Paul Engel
http://gettopup.com
158 stars 32 forks source link

JQuery 1.4.4 compatibility #22

Open rainerfrey opened 13 years ago

rainerfrey commented 13 years ago

With JQuery 1.4.4 I have the problem that the image lightbox opens in a minimal sized window (just showing the prev/next controls). On a click the correct size shows. On navigation in the group the location of the lightbox window moves down on the page (with every click on prev/next). These issues don't exist with JQuery 1.4.2.

I have this issue in a rails application that is quite unfinished, so it is difficult to show. If necessery, I'll try to provide a sample page that show the issue. Comments on gettopup.com report the same problem, so it should be easy to reproduce. Here are excerpts of the page:

<script src="/javascripts/jquery.js?1289927079" type="text/javascript"></script> 
<script src="/javascripts/jquery-ui.js?1288714555" type="text/javascript"></script> 
<script src="/javascripts/rails.js?1290186918" type="text/javascript"></script> 
<script src="/javascripts/top_up.js?1267987680" type="text/javascript"></script> 
<script src="/javascripts/application.js?1290180668" type="text/javascript"></script> 

<div class="photo" id="photo_6"> 
<a href="/system/photos/6/view/20100110_img_0196.JPG" class="photo"> 
    <img alt="20100110_img_0196" src="/system/photos/6/page/20100110_img_0196.JPG?1289416940" /> 
    </a>    <a href="/photos/6" data-confirm="Are you sure?" data-method="delete" rel="nofollow">[x]</a> 
</div>

From application.js:

TopUp.images_path="/images/top_up/";
TopUp.addPresets(
{
    "a.photo": {
        type: "image",
        group: "images",
        layout: "quicklook",
        modal: 0
    }
}
);
elvetemedve commented 13 years ago

Acutually it does not work with jquery 1.4.3 or later, neither 1.5.

timc3 commented 13 years ago

Comment out the following: if (to == "top_up") { jQuery("#top_up .te_content").css({width: jQuery("#temp_up .te_content").css("width"), height: jQuery("#temp_up .te_content").css("height")}); }