Skip to content

Instantly share code, notes, and snippets.

<!DOCTYPE html>
<html>
<head>
<title>Accordion - Item</title>
<style></style>
</head>
<body>
<div class="container container-fluid accordionPage">
<div class="row">
<div data-editor="html" data-title='Accordion Item' class="col-md-12 accordionItem">
$('.fullWidthBanner img').on('bestfit',function(){
var css;
var ratio=$(this).width() / $(this).height();
var pratio=$(this).parent().width() / $(this).parent().height();
if (ratio<pratio) css={width:'auto', height:'100%'};
else css={width:'100%', height:'auto'};
$(this).css(css);
}).on('load', function(){
$(this).trigger('bestfit');
}).trigger('bestfit');
@LouisWhit
LouisWhit / inpage-gallery-band.html
Last active August 14, 2018 18:48
A multi image sliding gallery to track the mod ul left and right depending on navigation arrow clicked.
@LouisWhit
LouisWhit / SimpleSlider.css
Created August 15, 2014 16:05
Simple Slider/Rotator Script. Has left an right arrows. Also auto rotates.
#custom1_mod li a{
cursor: default;
}
#custom1_mod li a.btn{
cursor: pointer;
}
@keyframes fadeInBottomBig {
0% {
opacity: 0;
transform: translateY(2000px);
@LouisWhit
LouisWhit / Share This Image Social Tag Creator.js
Created December 5, 2013 20:32
Dynamic Social Share Links for Galleries
var originalimg = largesrc.replace("sendimage?width=640&height=425&file=", "");
var fullsrc = 'http://' + window.location.host + originalimg;
var divopen = '<div class="itemShare">Share this image: '
var twitter = '<a target="_blank" href="http://twitter.com/home?status='+title+' '+ link +' "><img border="0" src="/assets/images/site-images/social-icons/twitter.gif"></a>'
var facebook = '<a target="_blank" href="http://www.facebook.com/sharer.php?u='+link+'&amp;t='+title+'" name="fb_share"><img border="0" src="/assets/images/site-images/social-icons/facebook.gif"></a>'
var linkedin = '<a target="_blank" href="http://www.linkedin.com/shareArticle?url='+link+'&amp;title='+title+'"><img border="0" src="/assets/images/site-images/social-icons/linkedin.gif"></a>'
var googleplus = '<a target="_blank" href="https://plus.google.com/share?url='+link+'"><img src="https://www.gstatic.com/images/icons/gplus-16.png" alt="Share on Google+"/></a>'
var pintrest = '<a target="_blank" href="//www.pinterest.com/pin/create/button
@LouisWhit
LouisWhit / Add a class while user is scrolling.js
Created December 2, 2013 15:38
Disable pointer events to improve scrolling performance on websites that have many hover effects.
var body = document.body,
timer;
window.addEventListener('scroll', function() {
clearTimeout(timer);
if(!body.classList.contains('disable-hover')) {
body.classList.add('disable-hover')
}
timer = setTimeout(function(){
@LouisWhit
LouisWhit / CSS Spinner.css
Created December 2, 2013 15:35
CSS Spinner
@keyframes spin {
to { transform: rotate(1turn); }
}
.progress {
position: relative;
display: inline-block;
width: 5em;
height: 5em;
margin: 0 .5em;
@LouisWhit
LouisWhit / Add RSS Auto Discovery.html
Created November 21, 2013 22:40
Adding this one line of code to your template or site wide tags will make it easier for people to subscribe to your RSS feed. You will of course need to change the value of the title and href attributes to fit your needs. Your href should be where your full rss feed address is located (note; the feed may not be all but should be whatever was set…
<link rel="alternate" type="application/rss+xml" title="RSS Feed for Your_website.com" href="www.yourwebsite.com/rss/all" />
@LouisWhit
LouisWhit / Replace BR with at.js
Created November 21, 2013 22:33
Some features such as Events have code such as: Jan 21, 2014<br />08:00 AM - 08:30 AM that dumps out of {dateinfo}. Some clients prefer that this displays on one line. The script below will achieve that goal.
<script type="text/javascript">
var s = "{dateinfo}";
s = s.replace(/<[^>]+>[^<]*<[^>]+>|<[^\/]+\/>/ig, " at ");
document.write(s);
</script>