title: Get modal input in same view Laravel
body: <p>I have a modal when click on a row of my list. My modal have an input. I want to get that input value for my AJAX in Jquery.</p>
  
  <p>Here is my modal:</p>
  
  <pre><code>&lt;!--Reset Password Modal--&gt;
  &lt;div id="resetModal-{{ $item['id'] }}" class="modal fade" tabindex="-1" role="dialog"&gt;
      &lt;div class="modal-dialog" role="document"&gt;
          &lt;div class="modal-content"&gt;
              &lt;div class="modal-header"&gt;
                  &lt;h4 class="modal-title"&gt;Đổi mật khẩu tài khoản Brand Portal&lt;/h4&gt;
                  &lt;button type="button" class="close" data-dismiss="modal" aria-label="Close"&gt;
                      &lt;span aria-hidden="true"&gt;&amp;times;&lt;/span&gt;
                  &lt;/button&gt;
              &lt;/div&gt;
              &lt;div class="modal-body"&gt;
                  &lt;div class="block-1"&gt;
                      &lt;label&gt;Tài khoản:&lt;/label&gt;
                      &lt;label&gt;{{ $item['email'] }}&lt;/label&gt;&lt;br&gt;&lt;br&gt;
                  &lt;/div&gt;
                  &lt;div class="block-2"&gt;
                      &lt;label&gt;Tự động sinh mật khẩu tự động&lt;/label&gt;
                      &lt;label class="switch"&gt;
                          &lt;input type="checkbox"&gt;
                          &lt;span class="slider round"&gt;&lt;/span&gt;
                      &lt;/label&gt;
                      &lt;br&gt;&lt;br&gt;
                      &lt;div class="text-container"&gt;
                          &lt;input type="password" id="password" name="password"&gt;
                          &lt;span toggle="#password-field" class="fa fa-fw ... toggle-password"&gt;&lt;/span&gt;
                      &lt;/div&gt;
                      &lt;br&gt;&lt;br&gt;
                  &lt;/div&gt;
                  &lt;label class="text"&gt;Yêu cầu đổi mật khẩu lần đăng&lt;br&gt; nhập tiếp theo&lt;/label&gt;
                  &lt;label class="switch"&gt;
                      &lt;input type="checkbox"&gt;
                      &lt;span class="slider round"&gt;&lt;/span&gt;
                  &lt;/label&gt;
              &lt;/div&gt;
              &lt;div class="modal-footer"&gt;
                  &lt;button type="button" class="btn btn-default" data-dismiss="modal"&gt;Hủy&lt;/button&gt;
                  &lt;a href="/" class="btn btn-xs btn-info pull-right" name="reset-btn"&gt;Tạo mật khẩu mới&lt;/a&gt;
              &lt;/div&gt;
              &lt;input type="hidden" name="id" value="{{ $item['id'] }}"&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>In Js file, I tried to get that input by:</p>
  
  <pre><code>$("reset-btn").click(function() {
    password = $("#password").val();
    console.log(password);
  });
  </code></pre>
  
  <p>But it's not working. </p>
  
  <p>How I can do that? Thank you very much!</p>