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
jQuery(function() { | |
jQuery('a[href*="#"]:not([href="#"])').click(function() { | |
if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) { | |
var target = jQuery(this.hash); | |
target = target.length ? target : jQuery('[name="' + this.hash.slice(1) +'"]'); | |
if (target.length) { | |
jQuery('html, body').animate({ | |
scrollTop: target.offset().top | |
}, 1000); | |
return false; |
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
swagger: '2.0' | |
info: | |
title: HostelsClub API | |
description: HostelsClub API | |
version: "1.0.0" | |
# the domain of the service | |
host: api.hostelsclub.com | |
# array of all schemes that your API supports | |
schemes: | |
- https |
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
swagger: '2.0' | |
info: | |
title: HostelsClub API | |
description: HostelsClub API | |
version: "1.0.0" | |
# the domain of the service | |
host: api.hostelsclub.com | |
# array of all schemes that your API supports | |
schemes: | |
- https |
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
window.findBootstrapEnvironment = function() { | |
var envs = ['xs', 'sm', 'md', 'lg']; | |
var $el = jQuery('<div>'); | |
$el.appendTo(jQuery('body')); | |
for (var i = envs.length - 1; i >= 0; i--) { | |
var env = envs[i]; | |
$el.addClass('hidden-'+env); |
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
addEventListener(document, "touchstart", function(e) { | |
console.log(e.defaultPrevented); // will be false | |
e.preventDefault(); // does nothing since the listener is passive | |
console.log(e.defaultPrevented); // still false | |
}, Modernizr.passiveeventlisteners ? {passive: true} : false); |
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
<script>var domReady = function(callback) {document.readyState === "interactive" || document.readyState === "complete" ? callback() : document.addEventListener("DOMContentLoaded", callback);};</script> |
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
function getHashVariable(variable) { | |
var query = window.location.hash.substring(1); | |
var vars = query.split('&'); | |
for (var i = 0; i < vars.length; i++) { | |
var pair = vars[i].split('='); | |
if (decodeURIComponent(pair[0]) == variable) { | |
return decodeURIComponent(pair[1]); | |
} | |
} |
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
function inlineSvg($file) | |
{ | |
$theFile = get_template_directory().'/dist/images/'.$file.'.svg'; | |
echo (is_file($theFile) ? file_get_contents(get_template_directory().'/dist/images/'.$file.'.svg') : ''); | |
} |
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
.iframe-wrapper { | |
overflow: auto; | |
-webkit-overflow-scrolling: touch; | |
} |
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
<?php | |
// in functions.php | |
function inlineSvg($file) | |
{ | |
$theFile = get_template_directory().'/'.$file.'.svg'; | |
echo (is_file($theFile) ? file_get_contents(get_template_directory().'/'.$file.'.svg') : ''); | |
} |
OlderNewer