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
| // jQuery same height HTML elements, per a row. | |
| $(window).load(function() { | |
| var currentTallest = 0, | |
| currentRowStart = 0, | |
| rowDivs = new Array(), | |
| $el, | |
| topPosition = 0; | |
| $('.blocks').each(function() { |
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
| <!-- Pre HTML5 --> | |
| <div class="img-caption" itemscope itemtype="http://schema.org/ImageObject"> | |
| <img src="" alt="" itemprop="contentURL"> | |
| <span itemprop="description"> | |
| Some image caption text. | |
| </span> | |
| </div> | |
| <!-- Post HTML5 --> | |
| <figure class="img-caption" itemscope itemtype="http://schema.org/ImageObject"> |
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 | |
| // Referrence: http://stackoverflow.com/questions/3161816/php-cut-a-string-after-x-characters | |
| // Max allowed characters | |
| $limit_max = 160; | |
| // If limit exeeded, remove 3 characters to make room for trail | |
| $limit_trail = $limit_max - 3; | |
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
| <script type="text/javascript"> | |
| $(document).ready(function() { | |
| //$('input').placeholder(); | |
| $('[placeholder]').focus(function() { | |
| var input = $(this); | |
| if (input.val() === input.attr('placeholder')) { | |
| input.val(''); | |
| input.removeClass('placeholder'); | |
| } | |
| }).blur(function() { |
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
| .global-inline-styles { | |
| h2 { | |
| padding-bottom: .35em; | |
| margin-top:0; | |
| margin-bottom:0; | |
| } | |
| h3 { | |
| padding-top: .25em; | |
| padding-bottom: .25em; | |
| margin-top: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
| // Pause all other HTML5 videos when a video is played | |
| $('video').click(function() { | |
| $("video").each(function () { this.pause() }); | |
| }); |
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
| window.onload = function() { | |
| // All images on page as an array | |
| var image = document.images; | |
| // Loop trough each image and return its height/width values | |
| for (var i = image.length - 1; i >= 0; i--) { | |
| image[i].style.outline = "3px solid orange"; | |
| image[i].scrollIntoView(); | |
| alert("Image height: " + image[i].height + "px \n" + "Image width: " + image[i].width + "px \n" + "Original height: " + image[i].naturalHeight + "px \n" + "Original width: " + image[i].naturalWidth + "px \n"); |
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
| // Run "npm init" and fill out the wizard | |
| // Then run the following to install all dependancies: | |
| // npm install gulp gulp-util gulp-plumber gulp-less gulp-cssmin gulp-concat gulp-rename gulp-livereload | |
| // Include gulp | |
| var gulp = require('gulp'); | |
| // Include Our Plugins | |
| var gutil = require('gulp-util'); | |
| var plumber = require('gulp-plumber'); |
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
| <!-- Add the styles below to your CSS file --> | |
| <style> | |
| input.email-error { | |
| color: #C24C4C; | |
| } | |
| </style> | |
| <!-- Add the jQuery below to your Javacript file --> | |
| <script> | |
| $(document).ready( function(){ |