Note that there are some explanatory texts on larger screens.

plurals
  1. POjQuery doesn't respond to my click event
    text
    copied!<pre><code>**DEVELOPMENT.JS** jQuery(function ($) { $("#doContact").click(function(e) { e.preventDefault(); alert("ho"); // ---- It doesn't alert ---- $("#contact-result").html('&lt;img src="&lt;%THEME%&gt;images/loading.gif"&gt;'); var formData = $("#registerForm").serialize(); $.post("?page=register", formData, function(response) { if(response.status == 'success') { $.modal.close(); $('#register-success').modal({ opacity:80 }); } else { $("#register-result").addClass('register-error'); $("#register-result").html(response.error_message); } },'json'); }); }); **CONTACTFORM.HTML** &lt;form id="contactForm" action="#" method="post" class="centered stylish"&gt; &lt;div id="contact-result"&gt; &lt;div&gt; &lt;p&gt;&lt;label for="username" class="label"&gt;Adınız:&lt;/label&gt; &lt;input id="username" placeholder="Adınız..." name="username" maxlength="20" type="text" tabindex="1" class="input" /&gt;&lt;/p&gt; &lt;p&gt;&lt;label for="email" class="label"&gt;Email: (geri dönüş için gerekli)&lt;/label&gt; &lt;input id="email" placeholder="Email adresiniz..." name="email" maxlength="70" type="text" tabindex="2" autocomplete="off" class="input"/&gt;&lt;/p&gt; &lt;p&gt;&lt;label for="message" class="label"&gt;Mesajınız:&lt;/label&gt; &lt;textarea id="message" placeholder="Mesajınız..." cols="60" rows="10" name="message" maxlength="1000" type="text" tabindex="2" autocomplete="off" class="input"/&gt;&lt;/p&gt; &lt;p&gt; &lt;button id="doContact" class="ui-button button1" type="submit"&gt; &lt;span class="button-left"&gt; &lt;span class="button-right"&gt;Mesajımı Gönder&lt;/span&gt; &lt;/span&gt; &lt;/button&gt; &lt;/p&gt; &lt;/div&gt; &lt;/div&gt; &lt;/form&gt; </code></pre> <p>The problem is simple. </p> <p>jQuery currently works for other divs which were placed on page load. (e.g yellow login area at top right of navigation bar)</p> <p>However, this form is loaded by an AJAX call so I believe I need to use functions like <code>delegate</code> or <code>live</code>. I don't know if that's the case, though.</p> <p>Could you have a look?</p>
 

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