CodeIgniter Forums

Full Version: Javascript stopped working while configuring routes
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I am setting up this site with use of templates. 

Javascript files were functional and working welll, but as a was routing pages so that index.php would not show in the site url and setting up different pages this started causing problems with the javascript.

Controllers are similar to this: 

defined('BASEPATH') OR exit('No direct script access allowed');

class Services extends CI_Controller {

    function __construct() {

public function index()

all routes are: 

$route['om_oss'] = 'about';
$route['tjanster'] = 'services';
$route['offert'] = 'offert';

$route['pagaende_projekt'] = 'blog/pagaende';
$route['avslutade_projekt'] = 'blog/avslutade';
$route['ovriga_projekt'] = 'blog/ovrigt';

$route['default_controller'] = 'welcome';
$route['404_override'] = '';
$route['translate_uri_dashes'] = FALSE;

I assume that my javascript files are not running in the appropriate time. The site is

Would love to get responses to this problem as i have been stuck here for ours. Probalby an easy solution to it.

Best regards
For one you are loading two different versions of jQuery

Also jQuery should be the first JavaScript file loaded all other js files require jQuery.