Solved

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

Posted on 2013-01-11
9
5,337 Views
Last Modified: 2013-01-24
How do I code the change event on a select2 dropdown?
0
Comment
Question by:cbrune
[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
  • 6
  • 3
9 Comments
 
LVL 82

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 82

Expert Comment

by:leakim971
ID: 38768878
0
Webinar: Aligning, Automating, Winning

Join Dan Russo, Senior Manager of Operations Intelligence, for an in-depth discussion on how Dealertrack, leading provider of integrated digital solutions for the automotive industry, transformed their DevOps processes to increase collaboration and move with greater velocity.

 
LVL 82

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 82

Expert Comment

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

Author Comment

by:cbrune
ID: 38768915
0
 
LVL 82

Expert Comment

by:leakim971
ID: 38768933
0
 
LVL 82

Accepted Solution

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

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Requirements JQuery 1.6+ HTML CSS Introduction This article was inspired by an EE question (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28372511.html) on how to make a page show some balloons animate up a page…
This article discusses how to implement server side field validation and display customized error messages to the client.
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…

733 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