title: Ajax Success display Message inside div displayed through jQuery
body: <p>i'm trying to display a success /error message when a user login to my website through a hidden div, that is displayed by on click event jQuery. Looks like whatever i try, nothing works. Already searched over and over but can't find a solution. Any help please?</p>
  
  <p>My current code:</p>
  
  <pre><code>  $(document).on('submit', '#loginform',function(e){
      e.preventDefault();
  
      var formData = new FormData($(this)[0]);
  
      $.ajax({
        url: 'portal/login',
        type: 'POST',
        dataType:"json",
        data:formData,
        contentType: false,
        processData: false,
        success: function(data) {
              if(data.status == 1) {
                  console.log(data.status);
                  $('.login_result.success').show();
  
              } else {
                  $('.login_result.error').show();
              }
          }
      });
  });
  
  $('.modaltrigger').on('click',function() {
      $('#loginmodal').fadeIn(500);
  });
  </code></pre>
  
  <p>So i'm using Ajax to validate the user login, and then at success i want to fadeIn the .login_result</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>My HTML code:</p>
  
  <pre><code>&lt;div id="loginmodal" style="display:none;"&gt;
  &lt;div id="placeHolder"&gt;
  &lt;div class="main_logo"&gt;&lt;img src="images/logo.jpg"&gt;&lt;/div&gt;
  &lt;form action="portal/login" method="post" class="login" name="loginform" id="loginform"&gt;
      &lt;input id="user_email" name="user_email" placeholder="Email" type="text"&gt;
      &lt;input id="user_password" name="user_password" placeholder="Senha" type="password"&gt;
      &lt;button class="search_button login_button" name="admin_login"&gt;Entrar&lt;/button&gt;
      &lt;span&gt;&lt;?php //echo $error; ?&gt;&lt;/span&gt;
  &lt;/form&gt;
  &lt;div class="login_result success"&gt;Login Efetuado com sucesso, Redirecionando!&lt;/div&gt;
  &lt;div class="login_result error"&gt;Login Inválido!&lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p></p>