Solved

jQuery indexOf with list filtering

Posted on 2014-04-03
2
323 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
jQuery parseHTML 6 85
links not working 2 34
TypeError jquery issues with site - CSS conflicts 3 46
Date Picker is picky (about something) 4 42
Hi all! Recently there was EE question and the person wanted to have a multi-column textbox <div> selection, so as a first step to answer I provided a link but that was not complete with JavaScript selection, but had a good style sheet. So as a ques…
This article discusses how to create an extensible mechanism for linked drop downs.
The viewer will learn how to dynamically set the form action using jQuery.
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…

732 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