• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Javascript stopped working while configuring routes

#1
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: 

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

class Services extends CI_Controller {

    function __construct() {
        parent::__construct();
   
        $this->load->helper('url');
    }

public function index()
{
$this->load->view('tjanster');
}
}
?>


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 https://engqvistwebb.se/dir/

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

Best regards
Joakim
Reply

#2
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.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.