Welcome Guest, Not a member yet? Register   Sign In
Error, Loading Jquery Class

Jquery Won't Load as Explained In CI Documentation

Hello, I am trying to use some jquery feature in my CI, Php Project. I opened the documentation and started to read.

Under The jQuery Class section, it is written that, we can write $this->load->library('jquery'); to use jquery. The problem is that, when I write this, my page gives me

Quote:An Error Was Encountered

Unable to load the requested class: jquery

I decided to give the jquery link in my view file instead, and remove the library code. If I write the function myself and use it; there is no problem. But removing the load library code, and using $this->load->library('javascript'); gives me a The White Screen Of Death which we are familiar from drupal. Absolutely no output.

And removing it too. (I already wrote <script type="text/javascript" src="<?php echo $library_src;?>"></script> instead).
and just using
And The Result
Quote:A PHP Error was encountered

Severity: Notice

Message: Undefined property: Main_Controller::$jquery

Filename: controllers/main_controller.php

Line Number: 7

I understand the last error, I didn't load the jquery library. Yes. But I couldn't.

What am I missing?

Help Please.

In my opinion, you shouldn't be using the library in the first place. Javascript should be separated from the back-end logic, and handled on its own elsewhere in your application structure.

Theme © iAndrew 2016 - Forum software by © MyBB