JavaScript Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsWeb DesignJavaScript Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old February 15th, 2013, 10:24 AM
paulh1983 paulh1983 is offline
Contributing User
Dev Shed Regular (2000 - 2499 posts)
 
Join Date: Dec 2004
Posts: 2,321 paulh1983 User rank is First Lieutenant (10000 - 20000 Reputation Level)paulh1983 User rank is First Lieutenant (10000 - 20000 Reputation Level)paulh1983 User rank is First Lieutenant (10000 - 20000 Reputation Level)paulh1983 User rank is First Lieutenant (10000 - 20000 Reputation Level)paulh1983 User rank is First Lieutenant (10000 - 20000 Reputation Level)paulh1983 User rank is First Lieutenant (10000 - 20000 Reputation Level)paulh1983 User rank is First Lieutenant (10000 - 20000 Reputation Level)paulh1983 User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 2 Weeks 1 Day 21 h 20 m 24 sec
Reputation Power: 201
jQuery - Jquery validate extension - need help with image on error?

ok so i am using the jquery validator plugin:

http://jquery.bassistance.de/validate/demo/

in the error placement function, I want to add the image before the input text box, but this doesnt seem to be working

here is the portion of my js
Code:
$(document).ready(function() { $(".error_image").css('visibility',"hidden");
var validator = $("#main_form").validate({
......
// the errorPlacement has to take the table layout into account
errorPlacement: function(error, element) {
    //element.siblings(".field_status").html(error)
    element.siblings(".error_images").css('visibility','visible');
},

});


note that if i undo the // in error placement, that works..

Here is my HTML code

Code:
 <div class="form_element">
<span class="error_image">
          <img src="expired.png"/>
</span>
 <label for="first_name_r">First Name*</label>
<input id="first_name_r" type="text" placeholder="John" name="first_name_r"  autofocus/>
                <div class="field_status"></div>
            </div>

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignJavaScript Development > jQuery - Jquery validate extension - need help with image on error?

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap