EllisLab text mark
Advanced Search
     
Using jQuery with CI
Posted: 12 December 2011 09:40 PM   [ Ignore ]
Joined: 2011-01-18
8 posts

I’ve read about it in the user guide but I have a hard time figuring out exactly what to do. From what I understand, once you load the Javascript class, jQuery should be loaded too, but when I add the line

$this->load->library('jquery'); 

to my controller’s index function and refresh, all I get is

Unable to load the requested class: jquery

So naturally, I suppose I must place the jQuery file somewhere. Where would that be, and how can I access it?

 
Posted: 04 November 2012 10:25 PM   [ Ignore ]   [ # 1 ]   [ Rating: 0 ]
Joined: 2007-06-20
1 posts

Try This
$this->load->library(“js/jquery”);

 Signature 

@v0lp

 
Posted: 05 November 2012 02:16 AM   [ Ignore ]   [ # 2 ]   [ Rating: 0 ]
Avatar
Joined: 2007-11-28
2435 posts

Read the user guide page. You’re loading it wrong.

Or, better yet, don’t use the silly jQuery library, and write it manually separately from your PHP logic.