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
// find the pathname | |
var urlPath = window.location.pathname; | |
//convert to lowercase | |
urlPath.match(/\/(.*?)(\+|$)/)[1].toLowerCase(); | |
// remove the first character | |
urlPath = urlPath.replace(/\//g, '-').slice(1); | |
//remove file extension | |
urlPath = urlPath.replace(/\.[^/.]+$/, ""); | |
// add class to body | |
$(document.body).addClass(urlPath); |
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
//---- Center an element in the center of your screen. | |
$(document).ready(function() { | |
jQuery.fn.center = function () { | |
this.css("position","absolute"); | |
this.css("top", ( $(window).height() - this.height() ) / 2+$(window).scrollTop() + "px"); | |
this.css("left", ( $(window).width() - this.width() ) / 2+$(window).scrollLeft() + "px"); | |
return this; | |
} | |
}); |
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" src="/prodhub/_catalogs/masterpage/AltairNet/js/jquery.SPServices-2014.02/jquery.SPServices-2014.02.min.js"></script> | |
<script type="text/javascript"> | |
//this is where the script starts after the page is loaded | |
$(document).ready(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
<span id="clock"></span> | |
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> | |
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery.countdown/2.1.0/jquery.countdown.min.js"></script> | |
<script src="//cdnjs.cloudflare.com/ajax/libs/moment.js/2.10.3/moment-with-locales.min.js"></script> | |
<script src="//cdnjs.cloudflare.com/ajax/libs/moment-timezone/0.4.0/moment-timezone-with-data-2010-2020.min.js"></script> | |
<script type="text/javascript"> | |
$(function() { | |
//November 17, 2015 - 10am ET | |
var nextYear = moment.tz("2015-11-17 10:00", "America/Detroit"); |
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
/** | |
* Defer iframe loading. | |
* | |
* Markup: | |
* <div class="defer-iframe" data-src="{SOURCE URL}" data-{ATTR}="{VAL}"></div> | |
*/ | |
$(window).load( function(){ | |
if ($('.defer-iframe').length) { | |
$('.defer-iframe').each( function() { | |
var $iframe = $('<iframe frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>'); |
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
<select name="" id="" class="form-control"> | |
<option value="">Select</option> | |
<option value="AFG">Afghanistan</option> | |
<option value="ALB">Albania</option> | |
<option value="DZA">Algeria</option> | |
<option value="ASM">American Samoa</option> | |
<option value="AND">Andorra</option> | |
<option value="AGO">Angola</option> | |
<option value="AIA">Anguilla</option> | |
<option value="ATA">Antarctica</option> |
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
include | |
{% include '<filename goes here>' %} |
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
<div class="embed-responsive embed-responsive-16by9"> | |
<iframe width="1280" height="720" src="https://www.youtube-nocookie.com/embed/UNIQUEID?rel=0&showinfo=0&modestbranding=1" frameborder="0" allowfullscreen></iframe> | |
</div> |
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
<link href="primary.css" rel="stylesheet"> | |
<link href="secodary.css" rel="stylesheet"> | |
<link href="sm.css" rel="stylesheet" media="(min-width: 544px)"> | |
<link href="md.css" rel="stylesheet" media="(min-width: 768px)"> | |
<link href="lg.css" rel="stylesheet" media="(min-width: 992px)"> | |
<link href="xl.css" rel="stylesheet" media="(min-width: 1200px)"> | |
<link href="print.css" rel="stylesheet" media="print"> | |
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
//Human Resources | |
$('#hrNav a').click(function(){ | |
$.getJSON("https://freegeoip.net/json/?callback=?", function(location) { | |
//United States | |
if (location.country_code == 'US') { | |
window.top.location.href = 'https://'; | |
//India | |
} else if (location.country_code == 'IN') { |