title: span tag not getting set using jquery
body: <p>I have a question . I'm trying to set the span value inside the Javascript but the value that is being  set as NAN</p>
  
  <p>Can any one please help? here is the code</p>
  
  <pre><code>$( '#delivery_time' ).change(function() {   
  var selectdate = $( '#delivery_time' ).val();
  var d = new Date(selectdate);   
  if(d.getDay() == 0 || d.getDay() == 6)  {      
     var span = $("ul#shipping_method li span.amount").text();
     var res = span.split("£");
     var newCost = ((parseFloat(res[1])*50)/100) + parseFloat(res[1]); //till this its ok and alerts prperly the value of new cost
  
     $("ul#shipping_method li span.amount").text(newCost); // when i set this it is returning NAN in the span value
  
    } 
  });
  </code></pre>
  
  <p>I am getting the value of newcost, which  i have checked using alert, but when i try to set the new cost to the span tag it sets NAN.</p>
  
  <p>Many Thanks</p>