Tagged: Multiple Galleries
- AuthorPosts
- April 27, 2015 at 17:28 #4738
AnonymousInactiveI 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/
May 12, 2015 at 23:05 #4825
RattusKeymasterHere is what you can add to your tabs javascript code:
jQuery('#galleryCategry a').on('click', function(){ jQuery('#galleryCategryContanr li.active .realSlider').realSlider('updateSliderSize'); });May 17, 2015 at 13:25 #4880
AnonymousInactiveI tried the above fix, but it shows error that “realSlider is not a function”. The fix can be viewed on my site cyberbel.com
May 18, 2015 at 10:23 #4889
RattusKeymasterOK. 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.May 23, 2015 at 18:01 #4935
AnonymousInactiveI 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.May 25, 2015 at 17:58 #4942
RattusKeymasterCan 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.
- AuthorPosts
- The forum ‘Troubleshooting’ is closed to new topics and replies.
