PageSourceSearch

https://www.ubacameroon.com/wp-content/themes/uba-child/js/custom-script.js?ver=1.1

js ubacameroon.com collected 2026-10-08 07:22:50 UTC 7,032 bytes, 209 lines download raw bytes

1jQuery(function ($) {
2
3//netcore
4  $('form').submit(function(e){
5       
6    var value = document.querySelector('input[type=email]').value;
7        smartech('contact', '78', {
8        'pk^email': { value }
9    });
10    
11    });
12    
13
14/* Reomving country link from current country flag */
15    
16$('.subsidiary_dropdown a.current-site').attr('href','javascript:;');
17    
18
19/* prepaid cards */
20
21$('#prepaidcard-tool input[type="submit"]').click(function(){
22    
23    var mastercard = ['539586', '528829', '522613', '525988', '528503', '530332', '543607', '543776', '548926', '543232', '543317', '543352', '543411', '543423', '543561', '559107', '531986', '535025', '529147', '529820']
24    var visa = ['484842', '445493, 403525', '414564', '457277', '457278', '457276', '457793', '406173', '428692', '457279', '444583', '484133', '457280', '418761', '471443', '471422', '418762', '457281', '445493', '403880']
25
26    var ID = document.getElementById('prepaid-input').value;
27    var i = mastercard.indexOf(ID);
28    var j = visa.indexOf(ID);
29
30    if (i > -1) {
31        var url = "https://mybankcardportal.unifiedpaymentsnigeria.com:1070/?restoreParams";
32        window.open(url, '_blank');
33    }
34    else if (j > -1) {
35        var url = "https://www.gtpsecurecard.com/UBA/Login.aspx";
36        window.open(url, '_blank');
37    }
38    else {
39        document.getElementById('pre-message').innerHTML = 'Please enter a valid PAN';
40        //document.getElementById("myDiv").style.borderColor = "red";
41    }
42    
43});
44    
45/* Search */
46$( "#dsh-menu-search-btn" ).click(function(){
47    $( "form.search" ).css({
48         'display': 'flex'
49     });
50});
51
52function closeSearch(){
53  $( "form.search" ).fadeOut( "fast", function() {});
54  $( "input.search-input" ).val('');
55}
56
57$( ".close-search" ).click(function(){
58    closeSearch();
59});
60
61$(document).on('keyup',function(r) {
62    if(($( "form.search" ).css('display') !== 'none') && (r.keyCode == 27)) {
63        closeSearch();
64    }
65});
66    
67
68function format2(n) {
69    return "₦" + n.toFixed(2).replace(/(\d)(?=(\d{3})+\.)/g, "$1,");
70}
71
72    /* Savings Calculator */
73    $('#savings-amount, #savings-time, #savings-years, #savings-balance').on("keyup change", function () {
74    	$('.savings-jumbotron .text-center').empty();
75    	var amount = parseInt($('#savings-amount').val());
76    	var balance = parseInt($('#savings-balance').val());
77    	var time = parseInt($('#savings-time').val());
78    	var years = $('#savings-years').val();
79    	var save_amount = parseFloat((amount - balance) / (savings_duration(years) * time));
80    	
81    	if(isNaN(save_amount)){
82    		var result = "<div class = 'text-center'>\
83    		<p>You need to save</p>\
84    		<h2>&#8358 0 per" + years +"</h2>\
85    		<p>to reach your goal of &#8358 0 in 0" + years+"</p>\
86    		</div>";
87    
88    		$('.savings-jumbotron').append(result);
89    
90    	}
91    	else{
92    		var result = "<div class = 'text-center'>\
93    		<p>You need to save</p>\
94    		<h2>&#8358 " + save_amount.toFixed(2) +  " per " + savings_duration_text(years) + "</h2>\
95    		<p>to reach your goal of &#8358 " + amount + " in " +time+ " " + years +"</p>\
96    		</div>";
97    		$('.savings-jumbotron').append(result);
98    	}
99    });
100    function savings_duration(years){
101    	switch(years){
102    		case "Years":return 12;
103    		case "Month":return 28;
104    		default:return 0;
105    	}
106    }
107    function savings_duration_text(years){
108    	switch(years){
109    		case "Years":return "month";
110    		case "Month":return "day";
111    		default:return 0;
112    	}
113    }
114    
115    //end of savings
116    
117    
118    //loan calculator
119    /* new loan calculator page */
120    $('#loan-amount, #loan-interestrate, #loan-duration').on("keyup change", function () {
121      var loan_amount = $('#loan-amount').val();
122      if (loan_amount == '') {} else {
123        var loan_amount = parseFloat(loan_amount.replace(/[^0-9 | ^.]/g, ''));
124        var months = $('#loan-duration').val();
125    
126        if (months == 0) { months = 1; }
127    
128        var interest_rate = $('#loan-interestrate').val();
129        var interest_total = loan_amount * interest_rate / 100;
130        var amount_and_interest = loan_amount + interest_total;
131        var monthly_pay = amount_and_interest / months;
132        $('#loan-totalpayment').val(format2(monthly_pay));
133        $('#loan-monthlypayment').val(format2(monthly_pay * months));
134        }
135    });
136   var xx_cognideck = window.location.href;
137if ( xx_cognideck.match("ubany.com") == null ) {
138    $('#uba-mobile-menu > a').click(function(e) {
139        e.preventDefault();
140
141            $('body.header-transparency').removeClass("mobile-search-only mobile-menu-open login-sub");
142            
143            $('body.header-transparency').toggleClass("mobile-menu-open login-sub");
144            var h = $('header#dsh-header').height() + 7 + "px";
145            $('.dsh-mobile-menu-scroll').css('margin-top', h );
146            $('#dsh-uba-login-top, #dsh-page-overlay').toggleClass('show');
147    })
148}
149    
150    $('#dsh-mobile-search-btn').click(function(e) {
151        e.preventDefault();
152
153            $('body.header-transparency').removeClass("mobile-search-only mobile-menu-open login-sub");
154            
155            $('body.header-transparency').toggleClass("mobile-menu-open mobile-search-only");
156            $('.dsh-mobile-menu-scroll').css('margin-top', "70px" );
157            $('#dsh-page-overlay').toggleClass('show');
158    });
159    
160    $('#dsh-mobile-menu-button').click(function() {
161        
162        if ( $('body.header-transparency').hasClass("mobile-menu-open") == true ) {
163                $('body.header-transparency').removeClass( "mobile-search-only login-sub" )
164                $('#dsh-page-overlay').removeClass('show');
165            }
166    });
167    
168    
169    // compare card feature
170    $(function(){
171        var options = [];
172        var value;
173        $(".compare-cardtbl tr td").hide();
174        $('select.compare-card').change(function(){
175            for(var y in options){
176                 console.log(y);
177                value = Number(options[y])+1;
178                $('.compare-cardtbl tr td:nth-child('+value+')').hide();
179            }
180            if(options.indexOf($(this).val()) <= -1){
181                options[$(this).attr('id')] = $(this).val();
182            }
183            $('select.compare-card').children().removeAttr('disabled');
184            for(var x in options){
185                value = Number(options[x])+1;
186                $('select.compare-card option:nth-child('+value+')').attr("disabled", "true");
187                $(".select.compare-card option[value='0']").removeAttr('disabled');
188                $('.compare-cardtbl tr td:nth-child(1)').show();
189                $('.compare-cardtbl tr td:nth-child('+value+')').show();
190                
191            }
192            
193            
194              
195
196        });
197        
198        
199        
200    
201    });
202    
203    $( document ).ready(function() {
204        // $( "select#gtranslate_selector" ).val($("select#gtranslate_selector option:first").val());
205        $( "select#gtranslate_selector" ).val("");
206    });
207    
208});
209

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.