Tagged: x
-
AuthorPosts
-
October 13, 2016 at 10:28 pm #1215659
StuartParticipantHello, I would be grateful for your assistance to have a page open in a lightbox, rather than a new page.
Please see: http://stuster.net/spielwelt/gap/#teachers
When clicking on ‘Esme Koslitz’, I would like this to open in a lightbox.I have added the custom javascript below so that this feature box is wrapped in a link, but have no idea how to open it in a lightbox. I added a class ‘lightbox’ to the anchor tag, but don’t know where to go from here.
(function($){ $('#esme').wrap('<a class="lightbox" href="http://stuster.net/spielwelt/gap/esme-koslitz/"></a>'); }Many thanks!
October 14, 2016 at 12:55 am #1215759
RupokMemberHi there,
Thanks for wriitng in! You can add any URL at your button’s href. If it’s not image then lightbox will automatically load inside the iframe.
Eg.
[button href="http://stuster.net/spielwelt/gap/esme-koslitz/" class="my_lightbox_button"]Open my page[/button] [lightbox selector=".my_lightbox_button"]Hope this helps.
October 14, 2016 at 1:22 am #1215778
StuartParticipantHi again, it’s not a button that opens the link, it’s a link wrapped around a feature box (see original post for details). So I can’t use the button shortcode to get this to work. Grateful for your further assistance. Thanks.
October 14, 2016 at 1:42 am #1215798
RupokMemberHi there,
I am not sure if that will work or not but you can try adding this :
[lightbox selector=".lightbox"]That is you already have the lightbox activator button (your feature box) and now you need to add the selector with same class. So it should work if you add this there somewhere.
Thanks!
October 14, 2016 at 3:09 am #1215860
StuartParticipantOk, so where would I add that? Is there somewhere within the feature box in cornerstone that I can add it? Or do I need to add it in the text editor outside of cornerstone? And if outside cornerstone, does this mean that I can’t modify the page in cornerstone in future? Thanks again!
October 14, 2016 at 3:36 am #1215886
Paul RModeratorHi,
You can add it in a text element that is on the same page.
Thanks
October 16, 2016 at 7:04 pm #1218615
StuartParticipantUnfortunately this gives a very strange result; the lightbox seems to be larger than full screen.
October 16, 2016 at 7:21 pm #1218625
StuartParticipantOk, ignore all that, I’ve found my own solution. For anyone else stumbling on this thread, follow these very simple steps:
1. Install the FancyBox for WordPress plugin.
2. Add the class “fancybox” to your anchor tag.
3. Voila! It works like magic.This will give you a perfect lightbox for opening an overlay of html content.
October 16, 2016 at 11:04 pm #1218881
RadModeratorGlad to hear that and thanks for sharing 🙂
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1215659 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
