Binding multiple chains
So far you've seen how we can make chains, and then bind them to one - or multiple - triggers. What about binding multiple chains to a single trigger? That's where the second argument to js() function is used.
The call syntax is js(trigger, prepend_js). As a second argument, you can pass either a JS chain, or an array of JS chains.
Result |
Code
$js=array(); |
Alternatively you can also bind the same action several times. This syntax can be used when actions are applied by controllers, or from multiple objects.
Result |
Code
$js1=$page->add('P')->set('Bounce') |
