I am using Ember component. In that one select and button available. My aim is to alert the selected options in the select element when clicking the button.
Code is here : http://jsbin.com/uQOWiqIk/1/edit
In the code, component repeated two times. When i click the button, the selected options in the particular component only need to be displayed. But in my code, it displays selected options of select element from all repeated components. How can i achieve this ?
I'd recommend using ember select, it'll be a much cleaner way of integrating with the ui. That aside, just for learning sake, if you use this.$
, it will scope to your current view/component.
var t=this.$('select option:selected');
alert(t.text());
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments