This file contains 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
/* | |
JS - Cross Browser Placeholder Text for Forms | |
Makes HTML5 Placeholder text work on all forms | |
Reference Link: http://scotch.io/quick-tips/js/making-html5-placeholder-input-fields-cross-browser-with-jquery | |
*/ |
This file contains 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
/* | |
JS - Media Match Function | |
Use JavaScript's matchMedia Method to detect the type of device you are using, and invoke/activate functions based on those criteria. | |
Reference Links: | |
http://davidwalsh.name/orientation-change | |
http://davidwalsh.name/device-state-detection-css-media-queries-javascript | |
http://www.slideshare.net/DavidKnight5/howto-match-media-25008199 |
This file contains 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
/* | |
JS - Duplicate and Copy Element's Methods | |
Take a method associate with an existing HTML element and add it to another element. | |
Reference Link: https://forum.jquery.com/topic/how-do-i-copy-the-click-event-from-one-element-to-another. | |
Tip: Know how your mouseevents or other actions work, you may need to break down certain steps in order to get the functionality you require. |
This file contains 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
/* | |
Sass - Line On Side Headers | |
Reference Link: http://css-tricks.com/line-on-sides-headers/ | |
Implementation Example: <h1 class="fancy"><span>Title</span></h1> | |
*/ |
This file contains 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
## Remove .php from File URL | |
## Reference Link: http://stackoverflow.com/questions/15917258/remove-php-from-urls-with-htaccess | |
# Turn mod_rewrite on | |
RewriteEngine On | |
RewriteBase / | |
# To externally redirect /dir/foo.php to /dir/foo | |
RewriteCond %{THE_REQUEST} ^[A-Z]{3,}\s([^.]+)\.php [NC] | |
RewriteRule ^ %1 [R,L] |
This file contains 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
/* | |
JS - Snap To Section | |
Snaps elements to the section as users scroll | |
Reference Link: http://stackoverflow.com/questions/6800404/scrollable-panel-snap-to-elements-on-scroll | |
*/ |
This file contains 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
/* | |
JS - Add and Remove Rules Directly to Stylesheets | |
Reference Site: http://davidwalsh.name/ways-css-javascript-interact | |
*/ | |
function addCSSRule(sheet, selector, rules, index) { | |
if(sheet.insertRule) { |
This file contains 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
/* | |
JS - Style Before and After Elements | |
Reference Site: http://davidwalsh.name/ways-css-javascript-interact | |
*/ | |
// Get the color value of .element:before | |
var color = window.getComputedStyle( |
This file contains 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
sectionScrolling: function () { | |
$('.specialized-practice-menu li a[href*=#]:not([href=#])').click(function(e) { | |
if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) { | |
var target = $(this.hash); | |
target = target.length ? target : $('[name=' + this.hash.slice(1) +']'); | |
if (target.length) { | |
$('html,body').animate({ | |
scrollTop: target.offset().top -50 | |
}, 500); |