MyListing Club

Change Package Selection Button Text

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

Overview

The Change Package Selection Button Text snippet allows for greater control of the add a listing flow within a MyListing website.

This snippet detects if a package name contains the word “Basic”, and if it does, changes the button text to read “Free”. 

Adjust the criteria and output text as needed.

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.

//// NOTES: 
//// For this particular snippet, it's saying if the package name contains the word "Basic" in it, change the button text to 
//// read "Free". Adjust as needed.

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

// CHANGE PACKAGE SELECTION BUTTON TEXT
jQuery(document).ready(function($) {
    $('.c27-packages .pricing-item .plan-name:contains("Basic")').siblings('.select-package').find('a').html('Free <i class="mi arrow_forward">')
});