title: Shorten function in Javascript / Jquery
body: <p>LF way to short my js/jquery function:</p>
  
  <pre><code>$.ajax({ // Start ajax post
  ..........
  success:    function (data) { // on Success statment start
  ..........
  //1. Part
  $('var#address').text(data.address);            
  $('var#telephone').text(data.telephone);            
  $('var#mobile').text(data.mobile);          
  $('var#fax').text(data.fax);            
  $('var#email').text(data.email);            
  $('var#webpage').text(data.webpage);        
  
  //2. Part
  if (!data.address){ $('p#address').hide(); } else {  $('p#address').show(); }; 
  if (!data.telephone){ $('p#telephone').hide(); } else {  $('p#telephone').show(); }; 
  if (!data.mobile){ $('p#mobile').hide(); } else {  $('p#mobile').show(); }; 
  if (!data.fax){ $('p#fax').hide(); } else {  $('p#fax').show(); }; 
  if (!data.email){ $('p#email').hide(); } else {  $('p#email').show(); }; 
  if (!data.webpage){ $('p#webpage').hide(); } else {  $('p#webpage').show(); }; 
  
  }, End Ajax post success statement 
  </code></pre>
  
  <p><strong>Here is my html:</strong></p>
  
  <pre><code>&lt;p id="address"&gt;Address:&lt;var id="address"&gt;Test Street 999 2324233&lt;/var&gt;&lt;/p&gt;
  &lt;p id="telephone"&gt;Telephone:&lt;var id="telephone"&gt;+1 0000009&lt;/var&gt;&lt;/p&gt;
  &lt;p id="mobile"&gt;Mobile:&lt;var id="mobile"&gt;+1 0000009&lt;/var&gt;&lt;/p&gt;
  &lt;p id="email"&gt;E-mail:&lt;var id="email"&gt;info@example&lt;/var&gt;&lt;/p&gt;
  &lt;p id="webpage"&gt;Web Page:&lt;var id="webpage"&gt;www.example.com&lt;/var&gt;/p&gt;
  </code></pre>
  
  <p>How can we reduce the number of selector*<em>(1. part)</em>* and else if the amount <strong>(2. part)</strong>?</p>