title: SyntaxError: expected expression, got ')' on submit a form using jquery
body: <p>I know there are many question on this topic but my question is a bit different</p>
  
  <p>when ever I try to submit a form using jquery I getting below error.</p>
  
  <blockquote>
    <p>SyntaxError: expected expression, got ')'     </p>
    
    <p>void()</p>
  </blockquote>
  
  <p><a href="https://i.stack.imgur.com/8NEQG.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/8NEQG.png" alt="enter image description here"></a> </p>
  
  <p>here is my html</p>
  
  <pre><code>&lt;form accept-charset="utf-8" method="post" id="UserIndexForm" data-togglesd="validator" role="form" class="specialist_filter_form validatate_form fv-form fv-form-bootstrap" action="/example/specialist" novalidate="novalidate"&gt;&lt;button type="submit" class="fv-hidden-submit disabled" style="display: none; width: 0px; height: 0px;" disabled="disabled"&gt;&lt;/button&gt;&lt;div style="display:none;"&gt;&lt;input type="hidden" value="POST" name="_method"&gt;&lt;/div&gt;
      &lt;section class="view_section inner_view"&gt;
          &lt;div class="container ph0"&gt;
              &lt;aside class="col-md-3"&gt;
                  &lt;div class="filter_side"&gt;
                      &lt;h6 class="bg_blue tab_heading ac"&gt;Refine Your Result&lt;/h6&gt;
                      &lt;div class="filter_box p20"&gt;
                          &lt;label&gt;Specialization &lt;a class="pull-right" href="#" data-target="#specialist_selectbox" data-toggle="modal"&gt;&lt;i class="fa fa-plus"&gt;&lt;/i&gt;&lt;/a&gt;&lt;/label&gt;
                          &lt;ul class="selected_tag"&gt;&lt;/ul&gt;             
                      &lt;/div&gt;
                      &lt;div class="filter_box p20"&gt;
                          &lt;label&gt;Search By Name&lt;/label&gt;
                          &lt;div class="form-group mt10 search-query-input has-success"&gt;
                              &lt;input type="text" id="UserKeywords" data-fv-regexp-message="The name can consist of alphabetical characters and spaces only" data-fv-regexp-regexp="^[a-z\s]+$" data-fv-regexp="true" data-fv-notempty-message="This field cannot be left blank." required="required" class="form-control searchKeywords ui-autocomplete-input" name="data[User][keywords]" data-fv-field="data[User][keywords]" autocomplete="off"&gt;                        &lt;!--                        &lt;a href="javascript:void()" class="search-query" onclick="document.getElementById('UserIndexForm').submit(); return false;"&gt;
                                                          &lt;i class="fa fa-search"&gt;&lt;/i&gt;&lt;div class="ripple-wrapper"&gt;&lt;/div&gt;
                                                      &lt;/a&gt;--&gt;
                              &lt;a id="your-id" class="search-query" href="javascript:void()"&gt;
                                  &lt;i class="fa fa-search"&gt;&lt;/i&gt;&lt;div class="ripple-wrapper"&gt;&lt;/div&gt;
                              &lt;/a&gt;
                              &lt;input type="hidden" id="UserId" name="data[User][id]"&gt;
                              &lt;small style="display: none;" class="help-block" data-fv-validator="notEmpty" data-fv-for="data[User][keywords]" data-fv-result="VALID"&gt;This field cannot be left blank.&lt;/small&gt;
                              &lt;small style="display: none;" class="help-block" data-fv-validator="regexp" data-fv-for="data[User][keywords]" data-fv-result="VALID"&gt;The name can consist of alphabetical characters and spaces only&lt;/small&gt;&lt;/div&gt;
                      &lt;/div&gt;
                  &lt;/div&gt;
              &lt;/aside&gt;
  
  
          &lt;/div&gt;
      &lt;/section&gt;
  
  
  &lt;/form&gt;
  </code></pre>
  
  <p>and here is the JS </p>
  
  <pre><code>$("#your-id").click(function () {
     if (!$("#UserKeywords").val()) {
        $('.search-query-input').addClass('has-error');
        $(".help-block").first().show();
        return false;
     } else {
        console.log($("#UserKeywords").val());
        $("#UserIndexForm").submit();
        //return true;
     }
  });
  </code></pre>