Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #4738

    adulapuram
    Participant

    I am using multiple galleries on a page. There will be a nav bar and based on the highlighted nav bar item corresponding gallery will be shown. So at a time only one gallery will be shown and others will be in hidden state. The problem is, on clicking of the second tab, image in the gallery is not centered but is displayed on the right. This was because the gallery was initiated with improper dimensions as the gallery was hidden initially.

    If i resize/open google inspector then the gallery is adjusting proper. Please visit: http://cyberbel.com/

    #4825

    Rattus
    Keymaster

    Here is what you can add to your tabs javascript code:

    jQuery('#galleryCategry a').on('click', function(){
      jQuery('#galleryCategryContanr li.active .realSlider').realSlider('updateSliderSize');
    });
    #4880

    adulapuram
    Participant

    I tried the above fix, but it shows error that “realSlider is not a function”. The fix can be viewed on my site cyberbel.com

    #4889

    Rattus
    Keymaster

    OK. Try just add below code to the end of your global.js file (delete previous fix):

    jQuery(function($){
      $('.navTabs a').on('click', function(){
        var realslider = $('#galleryCategryContanr li.active .realSlider');
        if(realslider.length){
          realslider.realSlider('updateSliderSize');
        }
      });
    });

    Also it is better if you include global.js file right before </body> tag.

    #4935

    adulapuram
    Participant

    I implemented both the suggestions, but still no luck. I guess the problem is with the scope of the realslider()
    realslider.length is coming as true and it is pointing to the right slider container, but the realslider() is unavailable.

    #4942

    Rattus
    Keymaster

    Can you give me temporary FTP access to wp-content folder, so I can try to solve your problem? When I run the js code via browser console it works fine.

Viewing 6 posts - 1 through 6 (of 6 total)

The forum ‘Troubleshooting’ is closed to new topics and replies.

Forum closed. Use forum at Wordpress.org: Gmedia Support Forum