Problem loading JQuery script

Hi,

I can’t see JQuery working.

I imported it with


<?php Yii::app()->clientScript->registerCoreScript('jquery'); ?> 

in the main.php layout file (to get JQuery working for all the pages) but nothing works.

I added a




<script type="text/javascript">

	$(document).ready(function(){

						

		alert("screen resolution");

        });

</script>



to see if the problem was in my code, but nor a simple "alert" function works.

How can I work out it?

P.S. I tried to put the "alert" function out from the $(document).ready but nothing happened.

If you put alert() out of the document.ready than this is pure javascript - no jQuery… so… is the javascript enabled in your browser?

Of course

You must put your code




<script type="text/javascript">

        $(document).ready(function(){

                                                

                alert("screen resolution");

        });

</script>



after <title> tag in your layout or use


registerScript

method

thanks. it works