- jQuery API Documentation: http://api.jquery.com/scroll/
- jQuery Scrollpane plugin: http://jscrollpane.kelvinluck.com
- jQuery Mouseweel plugin: https://github.com/brandonaaron/jquery-mousewheel
- jQuery Overscroll plugin: http://azoff.github.io/overscroll
- Add momentum scrolling via css: http://css-tricks.com/snippets/css/momentum-scrolling-on-ios-overflow-elements/
- jQuery Dragscrollable plugin: http://www.serkey.com/jquery-dragscrollable-pane-with-velocity-and-friction-bbucp3.html
- jQuery Ascensor plugin: http://kirkas.ch/ascensor/
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> | |
// Toggles a show-nav class on the body element | |
$(function() { | |
$('.toggle').click(function() { | |
if ($('body').hasClass('show-nav')) { | |
// side panel closed | |
$('body').removeClass('show-nav'); | |
} else { | |
// side panel open | |
$('body').addClass('show-nav'); |
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
.box { | |
height: 100vh; | |
width: 50vw; | |
} | |
/* | |
Note: The CSS height property is a bit tricky. | |
Setting the height:100% should make an element 100% the height of its parent. | |
This works, yes, but only when the parent has a fixed height. | |
*/ |
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
<?php | |
// Return a list of the custom taxonomies with links | |
function get_custom_taxonomies_list() { | |
global $post, $post_id; | |
// get post by post id | |
$post = &get_post($post->ID); | |
// get post type by post | |
$post_type = $post->post_type; | |
// get post type taxonomies | |
$taxonomies = get_object_taxonomies($post_type); |
Client Side
- The jQuery plugin for equalizing the height or width of elements. https://github.com/tsvensen/equalize.js
- A jQuery plugin that adds cross-browser mouse wheel support with delta normalization. https://github.com/brandonaaron/jquery-mousewheel
- A fully responsive css framework that is impossibly small. https://github.com/mrmrs/fluidity
- PACE An automatic web page progress bar. https://github.com/HubSpot/pace
- MixItUp A jQuery plugin providing animated filtering and sorting. https://github.com/patrickkunka/mixitup
- BOOTFLAT an open source Flat UI KIT based on Bootstrap 3.1.1 CSS framework. https://github.com/bootflat/bootflat.github.io
- FLUIDBOX Replicating and improving the lightbox module seen on Medium with fluid transitions. http://terrymun.github.io/Fluidbox/
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
function extract_string_from_array($array_of_strings, $comparison){ | |
$array = array(); | |
foreach ($array_of_strings as $string): | |
if (strstr($string, $comparison)): | |
array_push($array, $string); | |
endif; | |
endforeach; | |
return $array; | |
} | |
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
<?php | |
/* | |
Usage: | |
$frag = new CWS_Fragment_Cache( 'unique-key', 3600 ); // Second param is TTL | |
if ( !$frag->output() ) { // NOTE, testing for a return of false | |
functions_that_do_stuff_live(); | |
these_should_echo(); | |
// IMPORTANT | |
$frag->store(); | |
// YOU CANNOT FORGET THIS. If you do, the site will break. |
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
/** | |
* RETORNA URL DO POST_THUMBNAIL PARA BACKGROUND-IMAGE | |
* @param int: get_the_ID() | |
* @param string: thumbnail, medium, large, full | |
**/ | |
function post_thumbnail_url($post_id, $size = 'thumbnail'){ | |
$thumb = wp_get_attachment_image_src(get_post_thumbnail_id($post_id), $size ); | |
$url = $thumb[0]; | |
return $url; | |
} |
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
jQuery(document).ready(function($){ | |
$('#load-more button').click(function(e){ | |
e.preventDefault(); // revent normal form submission | |
var postoffset = $('.item').length; // count props on page | |
$.post( WPaAjax.ajaxurl, | |
{ | |
action : 'props_more', |
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
<?php | |
/** | |
* [list_searcheable_acf list all the custom fields we want to include in our search query] | |
* @return [array] [list of custom fields] | |
*/ | |
function list_searcheable_acf(){ | |
$list_searcheable_acf = array("title", "sub_title", "excerpt_short", "excerpt_long", "xyz", "myACF"); | |
return $list_searcheable_acf; | |
} |