I'm new in Zend Framework and I try to deal with some JS in my project. I have the following code in my layout.phtml:
<head>
<!-- Scripts -->
<?php echo $this->headScript()->prependFile($this->basePath() . '/js/html5.js', 'text/javascript', array('conditional' => 'lt IE 9',))
->prependFile($this->basePath() . '/js/jquery.min.js')
->prependFile($this->basePath() . '/js/bonsai.min.js')
->prependFile($this->basePath() . '/js/ui-controller.js'); ?>
</head>
My ui-controller.js contains simple JQuery script:
$(document).ready(function() {
alert('test);
});
The problem is it isn't executed at all... I checked in Firebug in Chrome and my file is linked correctly. HTML code seems to be okay aswell... Can anyone help me?
[edit]
I wanted to say that I know I can use ZendX_JQuery plugin but I wonder how to use other JavaScript libraries when this one doesn't work...
[edit 2]
I get this error in the console:
Uncaught ReferenceError: $ is not defined ui-controller.js:1 GET
http://myproject.localhost/js/jquery-1.10.2.min.map 404 (Not Found)
$isn't defined. I have 1.10.2 JQuery plugin already included and a link in Firebug seems to be okay...Uncaught ReferenceError: $ is not defined ui-controller.js:1 GET. Btw. Where to get .min.map file?