Solved

jQuery indexOf with list filtering

Posted on 2014-04-03
2
326 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 500 total points
ID: 39976283
Use jQuery.filter : http://api.jquery.com/filter/
0

Featured Post

Get Actionable Data from Your Monitoring Solution

Your communication platform is only as good as the relevance of the information you send. Ensure your alerts get to the right people every time with actionable responses. Create escalation rules that ensure everyone follows the process and nothing is left to chance.

Question has a verified solution.

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

Introduction HyperText Transfer Protocol (http://www.ietf.org/rfc/rfc2616.txt) or "HTTP" is the underpinning of internet communication.  As a teacher of web development I have heard many questions, mostly from my younger students who have come to t…
This article discusses how to implement server side field validation and display customized error messages to the client.
The viewer will learn how to dynamically set the form action using jQuery.
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)

691 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