Note that there are some explanatory texts on larger screens.

plurals
  1. POshow and hide div with jquery while using validate plugin
    primarykey
    data
    text
    <p>I'm having issues trying to get the fadeIn/Out method AND the form submission to happen within the same script. </p> <p>Often what's happening is that one will work, and the other won't. I've worked on this for about 6 hours now and I'm sure there is some logic that I'm unfortunately overlooking. </p> <p>An explanation or breakdown of how this should be written would be greatly appreciated!</p> <p>HTML</p> <pre><code>&lt;form id="form" action="#"&gt; &lt;div class="formmesage"&gt;&lt;p&gt;Hi, I'm &lt;/p&gt;&lt;/div&gt; &lt;div class="nameinput"&gt; &lt;input id="name" class="required" type="text" name="name" placeholder="name" tabindex="1"&gt; &lt;/div&gt; &lt;div class="formmesage"&gt;&lt;p&gt;and I'm a &lt;/p&gt;&lt;/div&gt; &lt;div class="selection"&gt; &lt;select id="profession" name="profession" tabindex="2"&gt; &lt;option type="text" value="designer"&gt;designer&lt;/option&gt; &lt;option value="developer"&gt;developer&lt;/option&gt; &lt;option value="designer &amp;amp; developer"&gt;designer &amp;amp; developer&lt;/option&gt; &lt;/select&gt; &lt;/div&gt; &lt;div class="formmesage"&gt;&lt;p&gt;looking to meet other &lt;/p&gt;&lt;/div&gt; &lt;div class="selection"&gt; &lt;select id="pairprofession" name="pairprofession" tabindex="3"&gt; &lt;option type="text" value="designer"&gt;designers&lt;/option&gt; &lt;option value="developer"&gt;developers&lt;/option&gt; &lt;option value="designer &amp;amp; developer"&gt;designer &amp;amp; developers&lt;/option&gt; &lt;/select&gt; &lt;/div&gt; &lt;div class="formmesage "&gt;&lt;p&gt;in&lt;/p&gt;&lt;/div&gt; &lt;div class="selection"&gt; &lt;select id="location" name="location" tabindex="4"&gt; &lt;option type="text" value="New York" p&gt;New York&lt;/option&gt; &lt;option value="Boston"&gt;Boston&lt;/option&gt; &lt;option value="Chicago"&gt;Chicago&lt;/option&gt; &lt;/select&gt; &lt;/div&gt; &lt;div class="btn"&gt; &lt;input id="email" class="required email" type="text" name="email" placeholder="email@address.com" tabindex="5"&gt; &lt;button type="submit"&gt;submit&lt;/button&gt; &lt;/div&gt; &lt;/form&gt;&lt;!-- form --&gt; </code></pre> <p>JQUERY</p> <pre><code>$(document).ready(function(){ $("#form").validate(); $("#form").submit(function(){ $("button").click(function(){ $("#form").delay(500).fadeOut("slow"); $(".message").delay(1000).fadeIn("slow"); return false; }) }) }) </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload