This line above
     $("ul#developerul > li").addClass("getValues");
does nothing.  It was part of another way I was going to suggest, then
forgot to erase it.  Sorry for the confusion.

,Manowar721

On Jan 26, 8:59 am, Manowar721 <manowar...@gmail.com> wrote:
> As long as, I am understanding what you are trying to do...this should
> work.
>
>         $(document).ready(function(){
>
>         var values = new Array();
>         $("ul#developerul > li").addClass("getValues");
>         for (x=0;x<=3;x++){
>         values[x] = $("ul#developerul > li").eq(x).attr("value");
>         }
>         $("ul#developerul").click(function(){
>         alert (values);
>         });
>
>         });
>
> Outputs 1,2,3.
>
> Hope that helps,
> Manowar721
>
> On Jan 22, 3:38 pm, nk <neetuk...@gmail.com> wrote:
>
>
>
> > Hi All,
>
> > I have a list which is being populated dynamically from the database.I
> > am trying to capture the value of the list items (using click
> > function) and pass it to a query to get the result set.The value
> > attribute has been deprecated for LI.Please tell me a way to capture
> > the LI value.
>
> > <ul id="developerul">
> >  <li value='1'>One</li>
> > <li value='2'>Two</li>
> > <li value='3'>three</li>
> > </ul>
> >  For the above I have tried
> > $("#developerul".children())
> > and also $(this).children()
> > But does not work.
>
> > -------------------------------------
> > And also how can we concatenate a ID value
> > ID="thelistItems"
> > the result should be "thelistItems_11130".
>
> > $("#thelistItems+ _ + 11130").append(txt);
>
> > Thanks- Hide quoted text -
>
> - Show quoted text -

Reply via email to