How to show/hide Profile based on Price set Total on a Contribution page?
I would use calculateTotalFee() to check if total amount is > 0.

CRM_Core_Resources::singleton()-&gt;addScript("
  CRM.$(function($) {
    hideshowMainProfile();
    $('#priceset [price]').bind('change keyup click blur', hideshowMainProfile);

    function hideshowMainProfile() {
      if (calculateTotalFee() &gt; 0) {
        $('.crm-public-form-item.crm-group.custom_pre_profile-group').show();
      }
      else {
        $('.crm-public-form-item.crm-group.custom_pre_profile-group').hide();
      }
    }
  });
");