This ability is important because you don’t want to take people away from your website when visiting an external website.
Customization Notes
This code snippet targets MyListing’s ‘Button 4’ Style (.button-4), so if you want this to target a different button style, be sure to update the snippet accordingly.
jQuery('.button-4').attr('target', '_blank')Now, the chances of you using that button class (.button-4) throughout other parts of your website are slim, but if you want to ensure you only target the buttons in a particular block, the steps below will help.
- Edit the shortcode block we’ve been working with.
- Custom Block ID > Add your desired ID (e.g., ‘sellbooks’).
- Adjust your code snippet as shown below.
jQuery('#sellbooks .button-4').attr('target', '_blank')