groenroos/minimalect — pull request #48 by patrickgalbraith (2014-08-01 06:08:30+00:00)
Title: Access to element during onChange callback

It would be great to have access to either the select element or the minimalect instance during the onChange callback. Currently the scope of the callback is the settings object which means it isn't possible to know which select the callback is for.

Simple example:

$("select").minimalect({
onchange: function(value, text) {
this.element // undefined
}
});

I've attached a pull request with the thisRef updated but you could also just pass the element reference through as an additional parameter.