jQuery .each or search function, how can I make use of those?
Posted
by Noor
on Stack Overflow
See other posts from Stack Overflow
or by Noor
Published on 2010-05-08T22:24:27Z
Indexed on
2010/05/08
22:28 UTC
Read the original article
Hit count: 284
I have a ul list, with 10 items, and I have a label that displays the selected li text.
When I click a button, I need to check the label, versus all the list items to find the matching one, when it finds that I need to assign the corresponding number.
I.e.
list: Messi Cristiano Zlatan
hidden values of list items: www.messi.com www.cronaldo.com www.ibra.com
label: Zlatan
script (thought)procces: get label text, search list for matching string, get the value of that string.
(and if someone could point me in a direction to learn these basic(?) stuff.
tried to be as specific as possible, thanks guys!
© Stack Overflow or respective owner