PageSourceSearch

https://nationsu.edu/wp-content/themes/nationsu/assets/dist/js/custom-jquery.js?ver=1791484871

js nationsu.edu collected 2026-10-08 22:46:43 UTC 4,155 bytes, 134 lines download raw bytes

1jQuery( document ).ready( function() {
2
3	/*Select countries redirection*/
4	jQuery( 'select#countries-dropdown').on( 'change', function(){
5		var _this_val = jQuery(this).val();
6
7		if ( jQuery.inArray( _this_val, localized_attributes.countries ) !== -1 ) {
8
9			window.location.href = localized_attributes.home_url + '/pay-registration-fee';
10		} else {
11			window.location.href = 'https://www.nationsu.net/login/signup.php';
12
13		}
14	});
15
16	/* Trigger amount preview on changed radio button*/
17	jQuery( 'input[name="donationAmount"]' ).on( 'change', function(){
18			var btn_amt = jQuery(this).val();
19			
20			var amount = '';
21			if ( 'other' === btn_amt ) {
22				jQuery('input[name="otherdonationAmount"]').show();
23				jQuery('.donation__total').text('');
24			} else {
25				jQuery('input[name="otherdonationAmount"]').hide();
26				btn_amt = parseFloat( btn_amt );
27				if( jQuery("#add_transaction_fee").prop('checked') == true){
28						amount = btn_amt * (3/100);
29						amount = btn_amt + amount;
30				} else {
31					var amount = btn_amt;
32
33				}
34
35				if ( jQuery('.donation__total .price').length == 0 ) {
36					jQuery('.donation__total').html('$<span class="price">'+amount.toFixed(2)+'</span>');
37				} else {
38					jQuery('.donation__total .price').text(amount.toFixed(2));
39				}
40			}
41
42	});
43
44	/* Tuition page other amount changed for preview*/
45	jQuery('input[name="otherdonationAmount"]').on( 'keyup', function(){
46		var _val = jQuery(this).val();
47		_val = parseFloat( _val );
48		var amount = '';
49		if( jQuery("#add_transaction_fee").prop('checked') == true){
50				amount = _val * (3/100);
51				amount = _val + amount;
52				amount = amount.toFixed( 2 );
53		} else {
54				amount = _val;
55				amount = amount.toFixed( 2 );
56
57		}
58
59		if ( jQuery('.donation__total .price').length == 0 ) {
60			jQuery('.donation__total').html('$<span class="price">'+amount+'</span>');
61		} else {
62			jQuery('.donation__total .price').text(amount);
63		}
64	});
65
66    var getLink  = document.referrer;
67    var cleanLink = getLink.match(/([^\/]*)\/*$/)[1];
68    var getClass = jQuery('body').attr('data-slug');
69    if(jQuery('.simpay-payment-receipt-wrap').length>0){
70    if((getClass != cleanLink ) && getClass){
71        jQuery('.gform_wrapper').addClass('hidden');
72        jQuery('.simpay-payment-receipt-wrap').css('display','block');
73    }
74    }
75    jQuery(document).bind('gform_post_render', function(){
76        if((getClass == cleanLink )&& getClass ){
77            jQuery('.gform_wrapper').addClass('hidden');
78            jQuery('.simpay-payment-receipt-wrap').css('display','block');
79        }
80    });
81
82
83
84	jQuery("#add_transaction_fee").on( 'change', function(){
85		var btn_amt = jQuery( 'input[name="donationAmount"]:checked' ).val();
86		if ( jQuery( 'input[name="donationAmount"]:checked' ).length > 0 ) {
87			
88			if ( 'other' === btn_amt ) {
89				btn_amt = jQuery('input[name="otherdonationAmount"]').val();
90				btn_amt = parseFloat( btn_amt );
91			} else {
92
93				btn_amt = parseFloat( btn_amt );
94			}
95		} else {
96			btn_amt = jQuery('.donation__total').data('price');
97			btn_amt = parseFloat( btn_amt );
98		}
99
100		var amount = '';
101		if( jQuery(this).prop('checked') == true){
102			amount = btn_amt * (3/100);
103			amount = btn_amt + amount;
104
105		} else {
106			var amount = btn_amt;
107		}
108		jQuery('.donation__total .price').text(amount.toFixed(2));
109	});
110
111	if( jQuery("#add_transaction_fee").prop('checked') == true){
112		var initial_price = jQuery('.donation__total .price').text();
113		var float_amount = Number( initial_price ).toFixed(2);
114		var amount = parseFloat( float_amount ) * (3/100);
115			amount = parseFloat( float_amount ) + parseFloat( amount.toFixed(2) );
116
117		jQuery('.donation__total .price').text(amount.toFixed(2));
118
119	}
120jQuery( document ).ajaxComplete(function() {
121  if (jQuery(".cpm-donation-table").length > 0){
122  // do something here
123	jQuery('.cpm-donation-table').html(jQuery('.cpm-donation-table').html().replace('Custom',''));
124if(jQuery('.cpm-donation-for').html()==""){
125      jQuery('.cpm-donation-for').html('-')
126    }
127if(jQuery('.cpm-covered').html()==""){
128      jQuery('.cpm-covered').html('-');
129var camount = jQuery('.covered-amount').html();
130jQuery('.total-amount').html('$'+camount);
131    }
132}
133});
134});

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.