html - textarea should give an error in jquery -


this input comes , gives me beskede if such there no content in them, therein fashion, want "textarea" had set beskede visitor page.

<form action="#" method="post" name="kontakt_box">                 <br />                 <label>navn<br /><input type="text" name="navn" class="new" placeholder="navn"> <span id="myhint">angive et navn</span></label><br />                 <label>efternavn<br /><input type="tel" name="efternavn" class="new" placeholder="efternavn"> <span id="myhint">angive et efternavn</span></label><br />                 <label>email<br /><input type="email" name="email" class="new" placeholder="email"> <span id="myhint">angive en e-mail</span></label><br />                 <label>tekst<br /><textarea name="tekst" cols="35" rows="10" class="new"></textarea></label><br />                 <label><input type="submit" name="send" value="send" class="new"></label>             </form>             <span id="sendt"></span>             <script src="/indhold/js/kontakt.js"></script> 

here jquery code:

    $("input").focus(function () {   $(this).next("#myhint").css('display','inline').fadeout(5000); });  $("form").submit(function() {   if ($("input").val() == "") {     $("#myhint").text("husk indhold!.").show();     return false;   }   $("#sendt").text("den er blevet sendt videre til mads Ørnfeldt andersen").show().fadeout(6000);   return true; }); 


Comments

Popular posts from this blog

java - Jmockit String final length method mocking Issue -

asp.net - Razor Page Hosted on IIS 6 Fails Every Morning -

c++ - wxwidget compiling on windows command prompt -