Open post within Foundation 3 Reveal
I'm trying to open a post within a reveal modal (F3). I solved initially by placing the reveal code within the loop of my custom post type. Thinks were good but I faced a couple of issues.
Since it's within the main loop, when page loads, it will load all the modals for each one of my custom post types, which is not very good from a performance standpoint. My code is basically: <a id="more" href="#myModal-<? the_ID(); ?>" data-reveal-id="<? the_ID(); ?>">Details</a> for the trigger and <div id="<? the_ID(); ?>" class="reveal-modal medium"> within the loop.
Also, I'm placing Foundation's Orbit for slideshows within that modal box. The issue is that it initiates on one of them only.
I know this is because the implementation is not good and Orbit slideshow can't be initialised so many times.
Does anyone have tried to implement this but instead having the modal code within the main loop, have it call the single template to show as it's content? Any other technique will be appreciated.
I'm trying to open a post within a reveal modal (F3). I solved initially by placing the reveal code within the loop of my custom post type. Thinks were good but I faced a couple of issues.
Since it's within the main loop, when page loads, it will load all the modals for each one of my custom post types, which is not very good from a performance standpoint. My code is basically: <a id="more" href="#myModal-<? the_ID(); ?>" data-reveal-id="<? the_ID(); ?>">Details</a> for the trigger and <div id="<? the_ID(); ?>" class="reveal-modal medium"> within the loop.
Also, I'm placing Foundation's Orbit for slideshows within that modal box. The issue is that it initiates on one of them only.
I know this is because the implementation is not good and Orbit slideshow can't be initialised so many times.
Does anyone have tried to implement this but instead having the modal code within the main loop, have it call the single template to show as it's content? Any other technique will be appreciated.
No comments:
Post a Comment