[jQuery] Re: $(ul li a).hover

2010-01-15 Thread d...@amystdesign.com
That depends upon which element has the ID or class that you're hoping
to select, for instance, if you have:
ul
   lia class=test-classList Item Text/a/li
/ul

or

ul id=nav-menu
   liaList Item Text/a/li
/ul

Then you would want

$(a.test-class).hover(...);
or
$(#nav-menu li a).hover(...);

respectively.

On Jan 14, 8:53 pm, J jesseparent...@gmail.com wrote:
 Hi,

 Im new to jquery.

 I have a .hover that is applied to all ul li a
 $(ul li a).hover

 Question: How can I apply the .hover to a specific class or id?

 I tried something like this but it didn't work for me:
 $(#test ul li a).hover
 $(test ul li a).hover

 Thanks


[jQuery] Re: Only one of two fields is required. How to implement this logic in Jquery form validation?

2009-10-12 Thread d...@amystdesign.com

It will be confusing for someone filling out your form if you leave
both fields available at the same time, instead... when the user
enters text into one of the fields why don't you run an onChange or
onKeyPress check to see if they've entered something and if so,
disable/hide the other field .attr('disabled', disabled') or .hide()
or if they have deleted what's in the field to enable/hide the partner
field again... just remember to include null checks to unset the
disabling/hiding



On Oct 12, 3:55 am, Phper hi.steven...@gmail.com wrote:
 Also, how to prevent a user filling out both fields?

 On Oct 12, 4:48 pm, Phper hi.steven...@gmail.com wrote:

  How to change the default position of an error message in Jquey form
  validation plugin?

  On Oct 12, 4:33 pm, Gordon grj.mc...@googlemail.com wrote:

   If you're using the Metadata plugin and inline rules:

   input type=text id=a class={validate:{required:'#b:blank'}} /
   input type=text id=b class={validate:{required:'#a:blank'}} /

   I've not actually tested it but it should work.

   On Oct 11, 4:37 am, Phper hi.steven...@gmail.com wrote:

There are two input fields in a form, but only one of them is
required, they are not required at the same time. Either A or B is
required. ( A is required  OR B is required). In other words, a user
can input data to field A, or he can input data to filed B, but he can
not input data to Both A and B at the same time.

How to implement this constraint in Jquery form validation?


[jQuery] [validate] credit card number validation fix

2009-04-26 Thread d...@amystdesign.com

I was using an input mask plug-in on the form as well, which I found
was causing the creditcard validator to fail (due to the spaces in the
mask between the (4) character groups).

This was fixed by moving line: 1017 to just above line: 1011 which
tests for only characters [^0-9-].

This could also have been fixed by adding a space to the regular
expression but since the replacement line is already in the code, just
moving it accomplishes what we're after.