Created
March 28, 2014 13:17
-
-
Save bradrice/9832467 to your computer and use it in GitHub Desktop.
Home scroller velocity code
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
#set($query = "+structureName:homeScroller +(conhost:5ce88b4e-45bc-4870-bd1e-3cb8399a11a1 conhost:SYSTEM_HOST) +homeScroller.active:1") | |
#set($list = $dotcontent.pull($query, '0', 'homeScroller.weightedOrder desc')) | |
<script type="text/javascript"> | |
// execute your scripts when DOM is ready. this is a good habit | |
jQuery(function() { | |
// initialize scrollable | |
jQuery("div.scrollable").scrollable( | |
{ | |
size: 3, | |
clickable: false, | |
speed: 300 | |
}).navigator(); | |
}); | |
</script> | |
<div id="scroller"> | |
<!-- navigator --> | |
<div class="navi"></div> | |
<!-- prev link --> | |
<a class="prev"></a> | |
<div class="scrollable"> | |
<!-- root element for the items --> | |
<div class="items"> | |
#foreach($item in $list) | |
#set($moddate = $date.format('ddMMyyyyHms', $content.modDate)) | |
<div id="item_${velocityCount}">#if($UtilMethods.isSet($item.link))<a href="$item.link" title="$item.linkTitle">#end<img src="$item.scrollImage.uri" alt="$item.linkTitle" /></a></div> | |
#end | |
</div> | |
</div> | |
<!-- next page --> | |
<a class="next"></a> | |
</div> | |
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment