Jquery get input value inside list which is inside a div

Posted by McNabbToSkins on Stack Overflow See other posts from Stack Overflow or by McNabbToSkins
Published on 2010-04-13T12:54:22Z Indexed on 2010/04/13 13:03 UTC
Read the original article Hit count: 363

Filed under:

I have something like the following

<div id="container">
      <ul id="name_list">
          <li class="name">
             <input type="hidden" class="name_val" value="5" />
          </li>
      </ul>
</div>

I am trying to get the value of the input. So far I have the following Jquery statment.

$("#container li.name input.name_val").val();

this does not work anyone know a better way?

© Stack Overflow or respective owner

Related posts about jQuery