Skip to content

Enqueue JavaScript and CSS Styles in CodeIgniter with a simple, lightweight library.

Notifications You must be signed in to change notification settings

lefkomedia/CodeIgniter-enqueue

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 

Repository files navigation

CodeIgniter-enqueue

Enqueue JavaScript and CSS Styles in CodeIgniter with a simple, lightweight library.

How to Use

Setup

  1. Add enqueue.php to YOUR/APP/PATH/application/libraries/
  2. Add enqueue to the array on Line 55: $autoload['libraries'] = array(); in YOUR/APP/PATH/config/autoload.php
  3. In your theme file(s) add $this->enqueue->loadjs(); and $this->enqueue->loadcss(); where you would like to load enqueued scripts.

Usage

Add JS and CSS files to YOUR/APP/PATH/public/js/ and YOUR/APP/PATH/public/css/, respectively. If these folders don't exist you will need to create them.

In your controllers or models add:

  • $this->enqueue->enqueue_js('JS_FILENAME'); to enqueue JavaScript
  • $this->enqueue->enqueue_css('CSS_FILENAME'); to enqueue CSS

About

Enqueue JavaScript and CSS Styles in CodeIgniter with a simple, lightweight library.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages