MIscellaneous JS Code Broken

Good morning,

I was removing some JS I am no longer using and now this code no longer seems to be working on denverhighriseliving.com:
/Condo Search Placeholder/
jQuery(document).ready(function(){
jQuery("#woocommerce-product-search-field-0").attr(“placeholder”, “Search Condos by Name”);
}

/Product Listing: Change “Related Products” to “Related Properties”/
jQuery(".related.products h2").html(“Related Properties”);

jQuery( document ).ready(function($) {
$(’.woocommerce-products-compare-widget-compare-button’).text(‘Compare’);
$(’.woocommerce-products-compare-widget-compare-button’).prop(‘title’, ‘Add some condos to compare’);
});

/Widget Compare Condos Edits/
jQuery(document).ready (function($){
$(’.woocommerce-mini-cart__empty-message’).text(‘Compare’);
$(’.woocommerce-mini-cart__empty-message’).text(‘No intel reports in the cart.’);
$(’.no-products’).text(‘Choose two to five condos to view and compare most popular features.’);
})(jQuery);

Do you see anything wrong?
Thank you!

Hi There @weatherstone

Thanks for writing in! We don’t provide support for 3rd party scripts or customizations. However I have changed your code as follows and it should work.

jQuery(document).ready(function(){ 
  jQuery("#woocommerce-product-search-field-0").attr("placeholder", "Search Condos by Name");
  /*Product Listing: Change "Related Products" to "Related Properties"*/ 
  jQuery(".related.products h2").html("Related Properties");
});

jQuery( document ).ready(function($) {
	$('.woocommerce-products-compare-widget-compare-button').text('Compare');
	$('.woocommerce-products-compare-widget-compare-button').prop('title', 'Add some condos to compare');
});
  
/*Widget Compare Condos Edits*/
jQuery(document).ready (function($){
  $('.woocommerce-mini-cart__empty-message').text('Compare');
   $('.woocommerce-mini-cart__empty-message').text('No intel reports in the cart.');
  $('.no-products').text('Choose two to five condos to view and compare most popular features.');
})(jQuery);

Thanks!

Thank you so much! Working again. :slight_smile:

You are most welcome!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.