?
Solved

jQuery indexOf with list filtering

Posted on 2014-04-03
2
Medium Priority
?
342 Views
Last Modified: 2014-04-07
I have a couple of cases in my jQuery code where I am going through a list but finding an element using indexOf.

One is looking for drop down lists ("select" elements) where the id contains a string, and the other is items in a drop down list (the "option" elements) where the value contains a string.

Is there a way to use the indexOf as part of the each expression?
0
Comment
Question by:purplesoup
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 22

Expert Comment

by:Mrunal
ID: 39975718
Hi
can you pl share any code sample ?
0
 
LVL 82

Accepted Solution

by:
leakim971 earned 2000 total points
ID: 39976283
Use jQuery.filter : http://api.jquery.com/filter/
0

Featured Post

More Than Just A Video Library

Train for your certification. Learn the latest DevOps tools. Grow your skillset to do better work.

At Linux Academy, we release new training modules every week so you'll always be up to date on the latest tech.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The most up-to-date version of this article is on my Blog https://iconoun.com/blog/
Introduction Knockoutjs (Knockout) is a JavaScript framework (Model View ViewModel or MVVM framework).   The main ideology behind Knockout is to control from JavaScript how a page looks whilst creating an engaging user experience in the least …
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question