Accepted answer

You can add a namespace to the event name like:"#timebasis")
    .on("change.sp", listenersp)
    .on("", listenerbt);


If an event listener was already registered for the same type on the selected element, the existing listener is removed before the new listener is added. To register multiple listeners for the same event type, the type may be followed by an optional namespace, such as "" and "". To remove a listener, pass null as the listener.

The functions are being passed the current datum d and index i, with the this context as the current DOM element. It looks like your two function expect the DOM element as argument? In that case it would look like:"#timebasis")
    .on("change.sp", function() { selectIndexSp(this); })
    .on("", function() { selectIndexBt(this); });

Related Query

More Query from same tag