Jesse Carter Jesse Carter - 1 year ago 61
jQuery Question

jQuery finding deeply nested input element

I'm using a form control in my project listed here

When I include it in my page it generates a whole whack of dynamic html to format everything nicely. However, I am trying to apply

jQuery datepicker
to a few of the input elements inside the form and I have no idea how to select the inputs I want.

I've nested the SuperForm directly inside a
called "
" so I know that I can use that as a starting point but I need to go through all of the descendants of that div till I find the right inputs, I know in which order they appear so I assume I can use nth-child(x) in here somewhere but so far I haven't had any luck. Any help would be greatly appreciated!

SOLVED! Here is my solution:

$("#bookings :input[type='text']:eq(2)").datepicker({...});

Answer Source

SOLVED! Here is my solution:

$("#bookings :input[type='text']:eq(2)").datepicker({...});
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download