This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$.fn.timepicker = function() { | |
return this.each(function() { | |
var self = $(this), | |
rqrd = self.prop('required'), | |
poly = $('<div class="form-inline polyfill-time" />'), | |
hour = $('<input type="number" class="form-control" size="2" maxlength="2" placeholder="12">'), | |
mins = $('<input type="number" class="form-control" size="2" maxlength="2" placeholder="00">'), | |
ampm = $('<select class="form-control"><option value="am">AM</option><option value="pm">PM</option></select>'), | |
time = { | |
hour: 0, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require_once "includes/config.php"; | |
$enqueue->add('script','js-for-about'); // loads JS for about.php only | |
$enqueue->add('style','about-only-styles'); // loads CSS for about.php only | |
include "theme/header.php"; | |
?> | |
<h2>About</h2> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html> | |
<head> | |
<?php | |
$enqueue->load('styles'); | |
?> | |
</head> | |
<body> | |
<h1>Header</h1> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* includes/config.php | |
*/ | |
require_once "Enqueue_class.php"; | |
$enqueue = new Enqueue(); | |
// ... the rest of your config file. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* about.php | |
*/ | |
require_once "includes/config.php"; | |
include "theme/header.php"; | |
?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Enqueue JavaScript and CSS Styles. | |
* | |
* @version 1.0 2015/02/18 | |
* @author Zach Johnson <[email protected]> | |
*/ | |
class Enqueue { | |
/** Start Config area */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); | |
/** | |
* Enqueue JavaScript and CSS Styles in CodeIgniter with a simple, lightweight library. | |
* CodeIgniter_Root/application/libraries/enqueue.php | |
* Version: 1.0 | |
*/ | |
class Enqueue { | |
public $scripts; |