title: If else from output as a result of input from user- Java Jquery
body: <p>I have used JQuery to multiply a number input by the user the website by 52.  This works however I am struggling to get the "output-value" in the middle of a sentence without it deleting the end of the sentence when the user inputs his number.</p>
  
  <p>Anyone know how to avoid it?  I have tried  which seems to work on some but just wont on mine.</p>
  
  <p>Also, once an user can see the output, I am trying to put a button in so that when the output is within certain numbers it prints out another sentence below.  This does not come up.</p>
  
  <p>Please find what I have so far below;</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;body&gt;
  
  &lt;src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"&gt;
  
  &lt;p&gt;How many times do you have drink coke each week?&lt;/p&gt;&lt;br&gt;
  &lt;p&gt;&lt;/p&gt;
  &lt;input type="text" id="input-value" /&gt; times a week.&lt;br&gt;
  &lt;p&gt;&lt;/p&gt;&lt;br&gt;
  
  &lt;p&gt;With 52 weeks in a year, the number of Coke's you would need for the year is at least  
      &lt;output type="text" id="output-value" /&gt; cans &lt;/p&gt;
  
  &lt;p&gt;Click the button to find out the best membership plan for you&lt;/p&gt;
  
  &lt;button onclick="myFunction()"&gt;Try it&lt;/button&gt;
  
  &lt;p id="demo"&gt;&lt;/p&gt;
  
  &lt;script&gt;
  var $output = $("#output-value");
  $("#input-value").keyup(function() {
  var value = parseFloat($(this).val());
  $output.val(value*52);
  });
  function myFunction()
  {
  var x="";
  var $output = $("#output-value");
  if ($output&lt;120)
  {
  x="Good man";
  }
  else ($output&gt;120)
  {
  x= "Bad";
  }
  document.getElementById("demo").innerHTML=x;
  }
  &lt;/script&gt;
  </code></pre>
  
  <p>Any Help wouldbemuch appreciated!</p>
  
  <p>Here it is on JSFiddle working the way i have described, you will notice the problems.</p>
  
  <p>Cheers</p>
  
  <p>James</p>