MyListing Club

Open Social Media Links in a New Browser Tab

Building better MyListing websites. One code snippet at a time.

Overview

The Open Social Media Links in New Browser Tab code snippet provides additional functionality for MyListing websites.

This snippet is highly-recommended, as it helps keep people on your website, while still allowing them to view the Social Media accounts in another browser tab.

Implementation

  1. Grab the code snippet.
  2. Follow the provided instructions.
  3. Save your changes.
				
					//// INSTRUCTIONS: 
//// Copy and paste the code snippet below into Theme Tools > Theme Options > Custom Code > JavaScript.

--------------------------- CODE SNIPPET IS BELOW THIS LINE --------------------------- 

// ML - OPEN SOCIAL MEDIA LINKS IN NEW BROWSER TAB
jQuery(document).ready(function ($) {
  $(".block-type-social_networks ul > li a").attr("target", "_blank");
});