title: Jquery click function not working when clicked
body: <p>I'm facing problem to trigger jquery click function. I want to hide phone number and email using jquery. The phone number and email only can see if using click the <code>&lt;p&gt;</code> tag.</p>
  
  <p>Below is my jquery function that I already write;</p>
  
  <pre><code>function() {
      var $phone = '123456123',
          $email = 'info@youremail.com',
          phone = $('#phone'),
          email = $('#email');
  
      $(phone).click(function() {
          var text = $(this).text() == $phone ?
              'Click to view number' : $phone;
          $(this).text(text).toggleClass("active");
      });
  
      $(email).click(function() {
          var text = $(this).text() == $email ? 
              'Click to view email' : $email;
          $(this).text(text).toggleClass("active");
      });
  
  }();    
  </code></pre>
  
  <p>When I run the code, I click on the number tag but nothing change.</p>