?
Solved

How do I code the change event on a select2 dropdown?

Posted on 2013-01-11
9
Medium Priority
?
6,529 Views
Last Modified: 2013-01-24
How do I code the change event on a select2 dropdown?
0
Comment
Question by:cbrune
  • 6
  • 3
9 Comments
 
LVL 83

Expert Comment

by:leakim971
ID: 38768867
$("#YOUR_DROPDOWN_ID").change(function() {
    alert( $(this).val() );
})

Open in new window

0
 

Author Comment

by:cbrune
ID: 38768875
it doesnt work on a select2 dropdown
0
 
LVL 83

Expert Comment

by:leakim971
ID: 38768878
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
LVL 83

Expert Comment

by:leakim971
ID: 38768883
0
 

Author Comment

by:cbrune
ID: 38768900
your not using the select2 plugin...it converts options to <ul> tags
0
 
LVL 83

Expert Comment

by:leakim971
ID: 38768904
I don't know the plugin you're talking about...
0
 
LVL 83

Expert Comment

by:leakim971
ID: 38768933
0
 
LVL 83

Accepted Solution

by:
leakim971 earned 2000 total points
ID: 38768937
The doc : http://ivaynberg.github.com/select2/#documentation
search for : on("change"
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

PROBLEM: The other day I was working on adding an ajax request to a webpage that already had a dialog box on the page.  The dialog box was using relative positioning to be positioned next to a form field I had on the page.  Everything was working…
In this article you'll learn how to use Ajax calls within your CodeIgniter application. To explain this, I'll illustrate how to implement a simple contact form to allow visitors to send you an email through your web site.
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…
Suggested Courses
Course of the Month16 days, 14 hours left to enroll

864 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