Welcome Guest, Not a member yet? Register   Sign In
Jquery and view file
#1

[eluser]mehwish[/eluser]
Can anyone tell me how to include a .JS file inside View file?
#2

[eluser]John_Betong_002[/eluser]
Try this:

Code:
<script type='text/javascript' src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js">
</script>

</body>
>/html>
 
 
#3

[eluser]Naga Gotama Adhiwijaya[/eluser]
create directory in your root directory, place your javascript files there.. and you can write this code:

Code:
< script type="text/javascript" src="<?php echo base_url()?>js/jquery.js" >< /script >


for example i load "jquery.js" from "js" directory.

don't forget to load URL Helper.




Theme © iAndrew 2016 - Forum software by © MyBB