Solved

jQuery indexOf with list filtering

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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Introduction Got endorsements from your clients?  Great!  There is almost nothing better than word-of-mouth advertising.  But how can you do that on the internet?  Sure you can make a page for endorsement quotations and list them all, but who is …
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
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…

708 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now