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

Popular posts from this blog

objective c - Change font of selected text in UITextView -

php - Accessing POST data in Facebook cavas app -

c# - Getting control value when switching a view as part of a multiview -