Hub Hack: Open Tiles in a New Window When "Auto Redirect to Item's Canonical URL" is Enabled

Follow

Use this Custom Code snippet to force Tiles to open in a new browser window when clicked.


 

Details

  • Type: JavaScript
  • Placement: Body Bottom
  • Notes: If you're using the Auto Redirect to Item's Canonical URL option on a Stream, this will open the link in a new browser window when any Tile in the Stream is clicked.

 

Code

<script>
Hubs.onLoad = Hubs.onPageChange = Hubs.onItemsLoaded = function(){
$("a.item-link[data-internal=false]").attr("target", "_blank");
};
</script>
0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.