* zin: support to bind multiple events with single callback.
This commit is contained in:
@@ -135,7 +135,10 @@ class on extends jsCallback
|
||||
$selector = $this->selector ? (',' . static::json($this->selector)) : '';
|
||||
|
||||
$callback = parent::toJS($joiner);
|
||||
return "\$element.$bindMethod('{$this->event}.zin.on'$selector,$callback);";
|
||||
$events = array_map(function($event){return $event . '.zin.on';}, explode('_', $this->event));
|
||||
$events = implode(' ', $events);
|
||||
|
||||
return "\$element.$bindMethod('$events'$selector,$callback);";
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user