SHARE
TWEET

Untitled

a guest Jun 19th, 2019 72 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <select class="form-control-input" name="from" id="visitorcountry" onclick="removeError(this.id);">
  2.  
  3.                                 <option value="" disabled selected>Select your Nationality</option>
  4.                                 <option data-price="ALB" data-cl="+355" data-fee="60" value="Albania" >Albania</option>
  5.                                 <option data-price="AND" data-cl="+376" data-fee="60" value="Andorra" >Andorra</option>
  6.                                 <option data-price="AGO" data-cl="+244" data-fee="60" value="Angola" >Angola</option>
  7.                                 <option data-price="ATG" data-cl="+1-268" data-fee="60" value="Antigua and Barbuda" >Antigua and Barbuda</option>
  8.                                 <option data-price="ARG" data-cl="+54" data-fee="0" value="Argentina" >Argentina</option>
  9.                                 <option data-price="ARM" data-cl="+374" data-fee="60" value="Armenia" >Armenia</option>
  10.                                 <option data-price="AWB" data-cl="+297" data-fee="60" value="Aruba" >Aruba</option>
  11.                                 <option data-price="AUS" data-cl="+61" data-fee="60" value="Australia" >Australia</option>
  12.                                 <option data-price="AUT" data-cl="+43" data-fee="60" value="Austria" >Austria</option>
  13.                                 <option data-price="AZE" data-cl="+994" data-fee="60" value="Azerbaijan" >Azerbaijan</option>
  14.  
  15. </select>
  16.      
  17. <div class="row" id="totalcostrow" style="display:none;" >        
  18. Total Cost : USD <span id="totalcost" style="float:none"></span>                                            
  19. </div>
  20.  
  21.  
  22.  <div class="preloader" style="display:none;" id="overlay">
  23.    <img src="../cassets/images/loader.gif" width="32" height="32" class="loader" alt="loader" title="Loader" />
  24. </div>
  25.      
  26. <script>
  27.  
  28. $(function() {
  29.     $("#visitorcountry").change(function(){
  30.         $('#overlay').show().delay(3000).hide("slow");
  31.         var element = $(this);
  32.         var option = $('option:selected', this).attr('data-fee');
  33.         var processing = 39;
  34.         var finalcost = parseInt(option) + parseInt(processing);
  35.  
  36.         $('#totalcost').html(finalcost);
  37.         $('#totalcostrow').show();
  38.  
  39.     });
  40. });
  41.  
  42. </script>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top