Float Bootstrap Labels on input fields and textareas
- Automatically adding * on required fields
- Highlighting required fields on focus
- Highlighting invalid fields always
Inspired by:
| <?php | |
| function date_diff($d1, $d2) | |
| { | |
| $d1 = (is_string($d1) ? strtotime($d1) : $d1); | |
| $d2 = (is_string($d2) ? strtotime($d2) : $d2); | |
| $diff_secs = abs($d1 - $d2); | |
| $base_year = min(date("Y", $d1), date("Y", $d2)); | |
| $diff = mktime(0, 0, $diff_secs, 1, 1, $base_year); | |
| return array( | |
| "years" => date("Y", $diff) - $base_year, |
| <?php | |
| /** | |
| * @author Ihsan Faisal | |
| */ | |
| class EscapeCommand | |
| { | |
| const ESC = "\x1B"; | |
| private $commands = ""; |
Float Bootstrap Labels on input fields and textareas
Inspired by:
RESPONSIVE MOVING BOX CAROUSEL DEMO
IE FIX Version You need to modify js: http://simonalex.com/demo/bootstrap/carouselbox/bootstrap-carousel-ie.js
Responsive Timeline built with Bootstrap
A Pen by Jennifer Perrin on CodePen.
This is just playing around with the idea of side tabs for tabbed navigation in bootstrap 3.
This is still a work in progress.
A Pen by Liam Conrad on CodePen.
| // Source: https://groups.google.com/forum/#!topic/angular/hVrkvaHGOfc | |
| // jsFiddle: http://jsfiddle.net/pkozlowski_opensource/PxdSP/14/ | |
| // author: Pawel Kozlowski | |
| var myApp = angular.module('myApp', []); | |
| //service style, probably the simplest one | |
| myApp.service('helloWorldFromService', function() { | |
| this.sayHello = function() { | |
| return "Hello, World!" |
| // Create the query as below (Note: "CUSTOMTAG" added for altering the query) | |
| $query = new EntityFieldQuery(); | |
| $query->entityCondition('entity_type', 'node') | |
| ->entityCondition('bundle', array('post', 'document', 'link'), 'IN') | |
| ->propertyCondition('status', 1) | |
| ->fieldCondition('og_group_ref', 'target_id', $panel_args[0], '='); | |
| // Added the Tag, which we will be using to alter the query. | |
| ->addTag('CUSTOMTAG'); | |
| // Complete the query (if you are having any other field condition). | |
| ->execute(); |
| // add your own submit function to drupal's user_login form | |
| function mymodule_form_alter(&$form, &$form_state, $form_id) { | |
| if ($form_id == 'user_login') { | |
| // $form['#submit'] is an array that contains all functions to run when form is submitted | |
| $form['#submit'][] = 'mymodule_login_redirect'; | |
| } | |
| } | |
| // this is the function you entered to run above | |
| function mymodule_login_redirect($form, &$form_state) { |