Search code examples
jqueryjqmodal

jqModal and ad-gallery


I found a great jquery gallery. (http://coffeescripter.com/2009/07/ad-gallery-a-jquery-gallery-plugin/) . I am trying to implement this in a jqmodal window but having some trouble.

To hide the jqmodal win, i have a file with:

<div id="jqmPix" class="jqmWindow" style="width:730px; display:none;">

on my main page:

  $('#jqmPix').jqm({modal:true});
  $('#clicky').click(function() {
   $('#jqmbPix').jqmShow();

});

The problem is when jqmShow() triggers, it messes up the ad-gallery's css. The main image disappears, and the thumbnails appear vertically instead of horizontally. IF i remove display:none from the jqmPix div, then it will work just fine. I tried $('#jqmPix').hide() as well. What can i do? thanks in advance.


Solution

  • Not sure if this is the best answer but this is what I did:

    I removed display:none, and put:

      $('#jqmPix').css('visibility','visible');
    

    on the main page doc.ready. Then i have the following ajax call:

     showPix = function(bhiid,projNum) {
    
        $.ajax({
            type: "get",        
            url: "myURL",
            data: formData,        
            cache: false,       
            success: function(result) { 
                     $('#jqmPix').css('visibility','visible');
                                     $('#jqmbPix').jqmShow();
    
                 .... }
    
        });
    }
    

    My next issue is the main div is not being moved to the right behind the ad-gallery.