open all links in a thumbnail grid in a new tab
-
why would you want to do that :/ mmh
<script> window.laytheme.on("newpageshown", function(){ jQuery(".type-thumbnailgrid a.thumb").attr('target', '_blank'); }) </script>
maybe this works
put it in lay options → custom html and css → custom head content -
@moND0711 said in open all links in a thumbnail grid in a new tab:
open all links in a thumbnail grid in a new tab
Hi Armin,
thanks a lot, it works!The thinking was this: On our customer's website there is a rather long "News" page with some thumbnail grids. If the user now clicks on a thumbnail he comes to the single news post. If he wants to go back to the overview he uses the back button in the browser. But then he always ends up at the top of the page. This is a bit inconvenient if the user is actually already browsing further down the page.
Therefore the consideration to open the thumbnail links always in a new tab. Or there is a solution as described above? That would be of course the most elegant.Cheers
Marc -
Is there is a solution for this:
On our customer's website there is a rather long "News" page with some thumbnail grids. If the user now clicks on a thumbnail he comes to the single news post. If he wants to go back to the overview he uses the back button in the browser. But then he always ends up at the top of the page. This is a bit inconvenient if the user is actually already browsing further down the page.
Therefore the consideration to open the thumbnail links always in a new tab. Or there is a solution as described above? That would be of course the most elegant.?
Best
Marc -
@moND0711 said in open all links in a thumbnail grid in a new tab:
But then he always ends up at the top of the page.
Actually that shouldn't happen!
Its a bug.. working on it now -
Thanks Armin!
-
i think it should work now if u update and u don't have "compatibility mode" activated
-
@arminunruh said in open all links in a thumbnail grid in a new tab:
compatibility mode
All right. This mode ist activated on my website. I'll have to check if all plugins work with deacitvated compatibility mode...
-
yea mmh
i need to make this work with that mode disabled too…
can you not use masonry for your thumbnailgrid?
can u disable masonry for a second and see if it works then?
Before you post:
- When using a WordPress Cache plugin, disable it or clear your cache.
- Update Lay Theme and all Lay Theme Addons
- Disable all Plugins
- Go to Lay Options → Custom CSS & HTML, click "Turn Off All Custom Code", click "Save Changes"
This often solves issues you might run into
When you post:
- Post a link to where the problem is
- Does the problem happen on Chrome, Firefox, Safari or iPhone or Android?
- If the problem is difficult to explain, post screenshots / link to a video to explain it