Skip to content

Instantly share code, notes, and snippets.

@solepixel
solepixel / jquery.script.js
Last active June 15, 2022 02:24
Vertically and horizontally center Soliloquy slides while still keeping proportions. Emulating the "background-size: cover" with a standard slider. Slider configuration looks like this: Slider Dimensions: Full Width, Slider Position: Center, Use Adaptive Height: Yes, Crop Images in Slider: Yes
(function( $ ){
'use strict';
function auto_fit_soliloquy( parent_selector ){
// resize the slider container
var $soliloquy = $( parent_selector + ' .soliloquy-container'),
$all_items = $('.soliloquy-slider,.soliloquy-viewport,.soliloquy-item', $soliloquy ),
$container = $('.soliloquy-item', $soliloquy ),
window_height = $(window).height();
@About2git
About2git / functions.php
Last active October 4, 2016 17:26 — forked from srikat/functions.php
How to Slide Down Search Box in a Full Screen Overlay in Genesis
<?php
//* Do NOT include the opening php tag
//* Make Font Awesome available
add_action( 'wp_enqueue_scripts', 'enqueue_font_awesome' );
function enqueue_font_awesome() {
wp_enqueue_style( 'font-awesome', '//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css' );
}