Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attaching event after the select is initialized is not working #38

Open
irshad-k opened this issue Dec 5, 2013 · 2 comments
Open

Attaching event after the select is initialized is not working #38

irshad-k opened this issue Dec 5, 2013 · 2 comments

Comments

@irshad-k
Copy link

irshad-k commented Dec 5, 2013

Firstly I would like to make all selects 'minimalect' at once (global.js)
$("select").minimalect();

Then Individually add events in the corresponding html/jsp pages
$("#caseSelect").minimalect({
onchange:function(v,t){
alert(t);
}
});
This does not fire onchange event!

@tezball
Copy link

tezball commented Feb 2, 2014

I had the same prob
You need to declare each one on it's own and add the onchange callback to the one you want the alert.

for eg
//want call back
$('#Vehicle').minimalect({
onchange: function (value, text) {
alert(value);
//alert(text);
}
});

//The rest
$('#BikeSelect').minimalect();
$('#CarSelect').minimalect();
$('#TruckSelect').minimalect();
$('#Location').minimalect();

@esifis
Copy link

esifis commented Jul 2, 2014

Hello
If I declare minimalect like :

$("#p_orderby, #ipp").minimalect({
onchange: function(value, text) {
....
}
});

how can I get the id or the name of the element that fired ?
Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants