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
{% capture foo_plaintext %}{% text foo %}{% endcapture %} | |
<a href="http://twitter.com/{{ foo_plaintext | strip_html | strip_newlines }}">Follow me on Twitter!</a> |
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 src="path/to/jquery.fitvids.js"></script> | |
<script> | |
$(document).ready(function(){ | |
// Target your .container, .wrapper, .post, etc. | |
$(".video-container").fitVids(); | |
}); | |
</script> |
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
<div id="bg" style="position:absolute;left:-9999px;"> | |
{% image background %} | |
</div> | |
<script type="text/javascript"> | |
var bg = $('#bg img').attr('src'); | |
$('body').css("background","url("+bg+") no-repeat"); | |
</script> |
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
<!-- | |
/ Before | |
/----------------------------- | |
/ Note: This only worked because the media_item.title | |
/ field already had URLs entered (http://) and that's it. | |
////////////////////////////// --> | |
<div class="media_title"> | |
{{ media_item.title }} | |
</div> |
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 type="text/javascript"> | |
$(document).ready(function(){ | |
$('form input:text, form textarea').each(function(){ | |
$.data(this, 'default', this.value); | |
}).focus(function(){ | |
if ($.data(this, 'default') == this.value) { | |
this.value = ''; | |
} | |
}).blur(function(){ | |
if (this.value == '') { |
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
// Replace spaces with underscores | |
.split(' ').join('_') | |
// Add a .trim function to remove whitespace from strings | |
String.prototype.trim = function() { return this.replace(/^\s+|\s+$/g, ''); } | |
// Add commas to a number | |
function addCommas(nStr) { | |
nStr += ''; | |
x = nStr.split('.'); |
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 type="text/javascript"> | |
jQuery(document).bind('afterfbinit', function () { | |
// The ID of your share button or link | |
$('#share_button').live('click', function () { | |
FB.ui({ | |
method: 'feed', | |
name: 'Title of Share Info', | |
description: 'Description under title in Share Info', | |
picture: 'Link to an image (90 by 90px)', | |
link: 'http://www.facebook.com/pages/@/{{ fb.page.id }}' |
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 type="text/javascript"> | |
var end = new Date('6 Oct 2011 23:59:59'); // Timer Expiration | |
var _second = 1000; | |
var _minute = _second * 60; | |
var _hour = _minute * 60; | |
var _day = _hour *24; | |
var timer; | |
function showRemaining() { |
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 type="text/javascript"> | |
var days_left = {{ time_clock.days }}; | |
var hours_left = {{ time_clock.hours }}; | |
var minutes_left = {{ time_clock.minutes }}; | |
var _now = new Date(); | |
var end = new Date(_now.getTime() + (minutes_left * 60 * 1000) ); | |
var _second = 1000; | |
var _minute = _second * 60; |
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
var cnt = $('.image_gallery').contents(); | |
$('.image_gallery').replaceWith(cnt); | |
$('.screen').remove(); |
OlderNewer