0

I purchased Savsoft Quiz application from http://savsoftquiz.com It is developed in CodeIgniter framework (MVC STRUCTURE). Now i am customizing its look and need to add a javascript file. i found header.php file in views folder where i can add javascript but My question in which folder i have to placed .js and css file ?

i tried to add it out side application folder and include it by giving base url like: <?php echo base_url('js/myjs.js');?> its work but not confident that it is right method to add javascript in codeigniter.

is there any recommended method to add it as helper or by any javascript library?

2 Answers2

0

I have seen the demo of the url you have provided.

I have a JS file is included with the path:

http://savsoftquiz.com/quizdemo/js/jquery.js

So, you can include your JS file in /js folder.

And include it.

Pupil
  • 23,834
  • 6
  • 44
  • 66
  • yes i tried this method and it is working but i think this is not right method as we define everything inside application folder like helper or library – user3136076 Nov 25 '14 at 07:51
0

Please check Placing of css in codeigniter views

you should check out the assets helper. it is an easy way to set up your paths in your config file and then make a call in your view to display full paths.

Community
  • 1
  • 1
Vishal Shinde
  • 26
  • 1
  • 4