Skip to content

Instantly share code, notes, and snippets.

View ajp's full-sized avatar

AJ Penninga ajp

View GitHub Profile
@ajp
ajp / gist:1227454
Created September 19, 2011 20:06
jQuery Cycle Usage with EE
{if cf_articles_slideshow}
<script type='text/javascript'>
$('#slideshow .slides').cycle({
fx: 'turnDown',
speed: 'fast',
timeout: 0,
pager: '#nav_slideshow ul',
next: '.slideshow_next',
prev: '.slideshow_prev',
// callback fn that creates a thumbnail to use as pager anchor
@ajp
ajp / gist:1401695
Created November 28, 2011 19:40
Custom timing on jquery cycle slideshow.
$('#homeslides').cycle({
fx: 'fade',
speed: 900,
timeoutFn: function(currElement, nextElement, opts, isForward) {
return parseInt($(currElement).attr('data-duration'), 10);
}
});
AND HTML of:
@ajp
ajp / gist:1606548
Created January 13, 2012 14:40
EE Image Replacement
{exp:nsm_transplant:body}
{cf_pages_body}
{cf_pages_images}
{exp:nsm_transplant:content id="image_{row_count}"}
<div class="image">
{if image_link}<a href="{image_link}">{/if}
{exp:ce_img:single src="{image}" max_width="{image_width}" class="{image_alignment}" alt="{image_title}" title="{image_caption}"}
{if image_link}</a>{/if}