Javascript stopped working while configuring routes - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24) +--- Thread: Javascript stopped working while configuring routes (/showthread.php?tid=74696) |
Javascript stopped working while configuring routes - gockzor - 10-26-2019 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 RE: Javascript stopped working while configuring routes - InsiteFX - 10-26-2019 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. |