local - run Javascript locally rather than connecting to JQuery -


is possible run script locally website rather connecting jquery.com hosted library/query? currently, connected online page performing query, functions in code , need run locally without need online librbary or library in background

thanks

code:

<script type="text/javascript" src="http://www.freshessays.com/jquery.min.js"></script>!-- start calculator block --  table class="fe_calc fe_block_templ" <tr>     <td>academic level:</td>     <td>         <select id="calform_academic_level1" name="academic_level" onchange="calcountprice1();" style="width:140px;">             <option value="0">please select</option>             <option value="1">high school</option>             <option value="2">bachelor</option>             <option value="3">master</option>             <option value="4">phd</option>             <option value="5">admissions help</option>         </select>         <em class="validator_exp"></em>     </td> </tr> <tr>     <td>deadline:</td>     <td>         <select id="calform_deadline1" name="deadline" onchange="calcountprice1();" style="width:140px;">             <option value="0" selected="selected">please select</option>              <option value="1">24 hours</option>              <option value="2">48 hours</option>              <option value="3">3 days</option>              <option value="4">4 days</option>              <option value="5">5 days</option>             <option value="6">6 days</option>             <option value="7">7 days</option>              <option value="8">8 days</option>             <option value="9">9 days</option>             <option value="10">10 days</option>             <option value="11">11 days</option>              <option value="12">12 days</option>             <option value="13">13 days</option>             <option value="14">14+ days</option>         </select>          <em class="validator_exp"></em>     </td> </tr>  <tr>     <td id="pages_name1">number of pages:</td>     <td>          <input maxlength="3" style="width: 40px;" id="calform_pages1" name="pages"  onkeyup="calcountprice1();" onkeydown="calcountprice1();" onchange="calcountprice1();" type="text">         <em class="validator_exp"> </em>     </td> </tr> <tr>     <td>the price is:</td>     <td>         <span id="calprice_div1">aed 0</span>     </td> </tr> <tr>     <td></td>  </tr> </table>  var calvalid;  function calvalidate_field (field_id) { var value = $("#"+field_id).val(); var tmp_reg_exp = $("#"+field_id).next(".validator_exp").html(); reg_exp = new regexp(tmp_reg_exp); if (!value.match(reg_exp) || (field_id == "form_repeat_password" && !check_password("form_new_user_password","form_repeat_password"))) {     calvalid = false;     return false; } return true; }   var caldeadline = new array (new array ( 0,135,153,188,235,318), new array ( 0,124,141,170,206,288), new array ( 0,106,129,153,177,235), new array ( 0,106,129,153,177,235), new array ( 0,106,129,153,177,235), new array ( 0,106,129,153,177,235), new array ( 0,94,118,141,165,218), new array ( 0,94,118,141,165,218),new array ( 0,94,118,141,165,218),new array ( 0,94,118,141,165,218), new array ( 0,94,118,141,165,218), new array ( 0,94,118,141,165,218),new array ( 0,94,118,141,165,218), new array ( 0,82,106,129,153,200));  $(document).ready(function() { $(".right_email").attr("href","mai"+"lto:su"+"ppor"+"t@fres"+"hessays.c"+"om").text("su"+"ppor"+"t@fres"+"hessays.c"+"om"); $("#calform_deadline").val(0); $("#calform_academic_level").val(0); });  function calcountprice() { calvalid = true;  calvalidate_field("calform_academic_level");  if (calvalid) {     var al = $("#calform_academic_level").val(); }   var add = 1; var round_off = false; var pages_name = 1;        if (pages_name == 1) {                 $("#pages_name").text("number of pages:");     }  calvalidate_field("calform_deadline");  if (!calvalid) {     $("#calprice_div").text("aed 0");             } else {      var total = caldeadline[$("#calform_deadline").val()-1][al];     var price_mod = 0.85;     var work = 1;     total = math.round(math.round(total*price_mod*add*(round_off? 10 : 1))*work)/(round_off? 10 : 1);             }  var valid1 = calvalid; calvalid = true; calvalidate_field("calform_pages");  if (!calvalid) {     $("#calprice_div").text("aed 0");             }  if (calvalid && valid1) {     totalp = total*$("#calform_pages").val();     $("#calprice_div").text("aed "+math.round(totalp*100)/100);             }  }  function calcountprice1() { calvalid = true;  calvalidate_field("calform_academic_level1");  if (calvalid) {     var al = $("#calform_academic_level1").val(); }   var add = 1; var round_off = false; var pages_name = 1;           if (pages_name == 1) {                 $("#pages_name1").text("number of pages:");     } calvalidate_field("calform_deadline1");  if (!calvalid) {     $("#calprice_div1").text("aed 0");             } else {      var total = caldeadline[$("#calform_deadline1").val()-1][al];     var price_mod = 0.85;     var work = 1;     total = math.round(math.round(total*price_mod*add*(round_off? 10 : 1))*work)/(round_off? 10 : 1);             }  var valid1 = calvalid; calvalid = true; calvalidate_field("calform_pages1");  if (!calvalid) {     $("#calprice_div1").text("aed 0");             }  if (calvalid && valid1) {     totalp = total*$("#calform_pages1").val();     $("#calprice_div1").text("aed "+math.round(totalp*100)/100);             }  }  </script> 

either download , use jquery locally, or use plain js

here demo of script after made changes. not work since html not contain stuff needed such regular expressions

var calvalid;  function calvalidate_field (field_id) {   var fld = document.getelementbyid(field_id);   var value = fld.value;   var tmp_reg_exp = fld.parentnode.getelementsbyclassname("validator_exp")[0].innerhtml;   reg_exp = new regexp(tmp_reg_exp);   if (!value.match(reg_exp) || (field_id == "form_repeat_password" && !check_password("form_new_user_password","form_repeat_password"))) {     calvalid = false;     return false;   }   return true; }   var caldeadline = [   [0,135,153,188,235,318],[0,124,141,170,206,288],[0,106,129,153,177,235],    [0,106,129,153,177,235],[0,106,129,153,177,235], [0,106,129,153,177,235],   [0,94,118,141,165,218],[0,94,118,141,165,218],[0,94,118,141,165,218],   [0,94,118,141,165,218],[0,94,118,141,165,218],[0,94,118,141,165,218],   [0,94,118,141,165,218],[0,82,106,129,153,200] ];  window.onload=function() {   // need change email class id:   var email = document.getelementbyid("right_email");   email.setattribute("href","mai"+"lto:su"+"ppor"+"t@fres"+"hessays.c"+"om");   email.innerhtml="su"+"ppor"+"t@fres"+"hessays.c"+"om";    // added <a href="#" id="right_email"></a>   document.getelementbyid("calform_deadline1").value=0;   document.getelementbyid("calform_academic_level1").value=0; };  function calcountprice() {   calvalid = true;   calvalidate_field("calform_academic_level");   if (calvalid) {     var al = document.getelementbyid("calform_academic_level").value;   }    var add = 1;   var round_off = false;   var pages_name = 1;        if (pages_name == 1) {     document.getelementbyid("pages_name").innerhtml="number of pages:";       }    calvalidate_field("calform_deadline");   if (!calvalid) {     document.getelementbyid("calprice_div").innerhtml="aed 0";   } else {     var total = caldeadline[document.getelementbyid("calform_deadline").value-1][al];     var price_mod = 0.85;     var work = 1;     total = math.round(math.round(total*price_mod*add*(round_off? 10 : 1))*work)/(round_off? 10 : 1);   }    var valid1 = calvalid;   calvalid = true;   calvalidate_field("calform_pages");   document.getelementbyid("calprice_div").innerhtml="aed 0";    if (calvalid) {     if (valid1) {       totalp = total*document.getelementbyid("calform_pages").value;       document.getelementbyid("calprice_div").innerhtml="aed "+(math.round(totalp*100)/100);     }   } }  function calcountprice1() {   calvalid = true;   calvalidate_field("calform_academic_level1");   if (calvalid) {     var al = document.getelementbyid("calform_academic_level1").value;   }   var add = 1;   var round_off = false;   var pages_name = 1;             if (pages_name == 1) {     document.getelementbyid("pages_name1").innerhtml="number of pages:";       }   calvalidate_field("calform_deadline1");   document.getelementbyid("calprice_div1").innerhtml="aed 0";    if (calvalid) {     var total = caldeadline[document.getelementbyid("calform_deadline1").value-1][al];     var price_mod = 0.85;     var work = 1;     total = math.round(math.round(total*price_mod*add*(round_off? 10 : 1))*work)/(round_off? 10 : 1);   }   var valid1 = calvalid;   calvalid = true;   calvalidate_field("calform_pages1");   if (calvalid) {     if(valid1) {      totalp = total*document.getelementbyid("calform_pages1").value;      document.getelementbyid("calprice_div1").innerhtml="aed "+math.round(totalp*100)/100;    }   } } 

Popular posts from this blog

How to calculate SNR of signals in MATLAB? -

c# - Attempting to upload to FTP: System.Net.WebException: System error -

ios - UISlider customization: how to properly add shadow to custom knob image -