Hello World jQuery Code not working -


i'm trying system set-up learn jquery , can't seem simple hello world program work , i'm not sure why. seems should work fine.

i'm using ci here controller followed view. thanks.

class java extends controller{      function index(){         $this->load->view('java_view');     }  }    

the view file:

<script type = "javascript" src="http://localhost/ci/js/jquery.js"></script>  <script type="javascript">       $(document).ready(function() {          $("#hi").click(function() {             alert("hello world!");         });     }); </script> 

<a id = "hi" href="">link</a> 

works perfectly, proven in example: http://jsfiddle.net/tt5s7/

the error has in linkage jquery.js or in java controller.


Comments

Popular posts from this blog

c++ - How do I get a multi line tooltip in MFC -

asp.net - In javascript how to find the height and width -

c# - DataTable to EnumerableRowCollection -