Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to bind to browser change of input field? (jQuery)
    primarykey
    data
    text
    <p>Please take a look at this: <a href="http://jsfiddle.net/sduBQ/1/" rel="nofollow noreferrer">http://jsfiddle.net/sduBQ/1/</a></p> <p>Html:</p> <pre><code>&lt;form action="login.php" method="post" id="login-form"&gt; &lt;div class="field"&gt; &lt;input name="email" id="email" type="text" class="text-input" value="E-mail" /&gt; &lt;/div&gt; &lt;div class="field"&gt; &lt;input name="code" id="code" type="password" class="text-input" /&gt; &lt;div id='codetip'&gt;Access Code&lt;/div&gt; &lt;label class="error" for="code" id="code_error"&gt;&lt;/label&gt; &lt;/div&gt; &lt;br /&gt; &lt;div class="container"&gt; &lt;a id="submit" class="link-2"&gt;Access&lt;/a&gt; &lt;/div&gt; &lt;/form&gt; </code></pre> <p>CSS:</p> <pre><code>a { border: solid 1px #777; padding:5px; } #codetip { position:absolute; margin-top:-20px; margin-left:5px; } </code></pre> <p>Javascript:</p> <pre><code>$('#email').focus(function(){ if($(this).val()=='E-mail'){$(this).val('');} }); $('#email').blur(function(){ if($(this).val()==''){$(this).val('E-mail');} }); $('#code').focus(function(){ $('#codetip').hide(); }); $('#code').blur(function(){ if($(this).val()==''){$('#codetip').show();} }); $('#codetip').click(function(){ $(this).hide(); $('#code').focus(); }); $('#submit').click(function(){ $(this).submit(); }); </code></pre> <p>The problem is that at least in Chrome(haven't tried other browsers yet) when the Chrome Password Manager saves your password and prefills the password for you when you pick the email. I use jquery to hide/show a div over the top of the password input field as a label, hiding that div when the user clicks into the password field (as can be seen in the above jsfiddle code). I need to know how to hide that div when Chrome prefills the password field...</p>
    singulars
    1. This table or related slice is empty.
    plurals
    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