php - How can I define scripts in CakePHP? -
whenever trying define 2 scripts way:
echo $this->html->script(array('jquery', 'prototype')); only prototype working.
when way:
echo $this->html->script(array('prototype', 'jquery')); only jquery working.
how fix both working?
that because both use $ variable, , second script overwrites first.
try creating script middle contains:
$j = $.noconflict(); //sets `$j` jquery variable then do:
echo $this->html->script(array('jquery', 'middlescript', 'prototype'));
Comments
Post a Comment