Skip to content

novastream/ci3_script_helper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

Codeigniter 3 Script Helper

Simple script helper with similar functionality as the built in link_tag().

  • Only tested with CI3 maybe works with 2.x as well
  • Copy script_helper.php to your application/helpers directory
  • Load the helper in your controller or in config/autoload.php

Version

1.0

Usage

echo script_tag('assets/js/myfile.js', true, false, true, false);

will generate

<script src="http://mysite.com/assets/js/myfile.js" async defer></script>

Params

  • string script source
  • bool async (bool false to skip)
  • string charset (bool false to skip)
  • bool defer (bool false to skip)
  • string type (bool false to skip)

About

Script helper for Codeigniter 3

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages