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
$(document).ready(function(){ | |
$window = $(window); | |
var targetHeight = $window.height(); | |
var viewportWidth = $window.width(); | |
if (viewportWidth > 640) { | |
$('#targetID').css({ height: targetHeight }); | |
} | |
}); | |
$(window).bind('resize', 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
// Blog Grid Center Fix | |
function centerBlockGrid(listID){ | |
$window = $(window); | |
var windowWidth = $window.width(); | |
var listWidth = $(listID).width(); | |
var smallGrid; | |
var mediumGrid; | |
var largeGrid; |
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
@media only screen and (-webkit-min-device-pixel-ratio: 2) { | |
#header { background: url('/themes/site_themes/site/img/header-image-retina.jpg'); } | |
} | |
@media only screen and (min--moz-device-pixel-ratio: 2) { | |
#header { background: url('/themes/site_themes/site/img/header-image-retina.jpg'); } | |
} | |
@media only screen and (-o-min-device-pixel-ratio: 2/1) { | |
#header { background: url('/themes/site_themes/site/img/header-image-retina.jpg'); } | |
} | |
@media only screen and (min-device-pixel-ratio: 2) { |
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
// Cable Field Required | |
$('#email_optin').click(function() { | |
if ($('#email_optin').prop('checked')) { | |
$('#cable_provider').attr('required', true); | |
$('#cable_provider_label').addClass('required-label'); | |
} | |
if (!$('#email_optin').prop('checked')) { | |
$('#cable_provider').removeAttr('required'); | |
$('#cable_provider_label').removeClass('required-label'); |
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
// Combo Box | |
$(document).ready(function() { | |
$('#providers li').click(function(e) { | |
$('#provider').val($(this).text()).change(); | |
setTimeout(function () { | |
$('#provider-list').hide(); | |
}, 300); | |
}); | |
$('#provider').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
<!doctype html> | |
{if '{exp:browser_detect:browser}' == 'IE8'} | |
<html class="no-js lt-ie9" lang="en"> | |
{if:elseif '{exp:browser_detect:browser}' == 'IE9'} | |
<html class="no-js lt-ie10" lang="en"> | |
{if:else} | |
<html class="no-js" lang="en"> | |
{/if} | |
<head> |
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
// Slick | |
$('.image-switcher').slick({ | |
slidesToShow: 1, | |
slidesToScroll: 1, | |
autoplay: true, | |
fade: true, | |
pauseOnHover: false, | |
autoplaySpeed: 5000, | |
}); |
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
// Popup | |
function popupCenter(pageURL,title,w,h) { | |
var left = (window.screen.width/2)-(w/2); | |
var top = (window.screen.height/2)-(h/2); | |
var targetWin = window.open (pageURL, title, 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, copyhistory=no, width='+w+', height='+h+', top='+top+', left='+left); | |
} |
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
// IE8 Map Fix - Add data-lat and data-long attributes to .map-container | |
if ($('html').hasClass('lt-ie9')) { | |
if($('.map-container').length ) { | |
var mapLat = $('.map-container').attr('data-lat'); | |
var mapLong = $('.map-container').attr('data-long'); | |
setTimeout(function() { | |
google.maps.event.trigger(map, 'resize'); | |
map_map.setCenter(new google.maps.LatLng(mapLat,mapLong)); | |
}, 500); |