I am trying to implement Jquery library. My goal is to never use prototype and its related built-in libraries.
I installed the jquery plug-in and downloaded the newest version of jquery.
When I load the plug-in, it automatically loads the jquery.js file from ../web/js/jq directory. I also created js file related to a module
The html headers look like this:
- Code: Select all
<link rel="shortcut icon" href="/favicon.ico" />
<script type="text/javascript" src="/sf/sf_web_debug/js/main.js"></script>
<script type="text/javascript" src="/js/execcase.js"></script>
[b]<script type="text/javascript" src="/js/jq/jquery.js"></script>[/b]
<link rel="stylesheet" type="text/css" media="screen" href="/sf/sf_web_debug/css/main.css" />
<link rel="stylesheet" type="text/css" media="screen" href="/css/enf.css" />
<link rel="stylesheet" type="text/css" media="screen" href="/css/execcase.css" />
</head>
The execcase.js and .css are module related.
In execcase.js I entered some simple script just to try the jquery:
- Code: Select all
$(document).ready(function(){
$('#execcase').css('border', '1px solid red');
});
the #execcase is the id of a table.
When I load the page the script seems to to workig and when I look into the FireBug console I get the following error message:
- Code: Select all
$ is not defined
$(document).ready(function(){
Any ideas to why the jquery library does not load correctly?
I use symfony 1.0.11 and with dev enviroment with the debug toolbar turned on.
