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 ($) { | |
$.event.special.textchange = { | |
setup: function (data, namespaces) { | |
$(this).bind('keyup.textchange', $.event.special.textchange.handler); | |
$(this).bind('cut.textchange paste.textchange input.textchange', $.event.special.textchange.delayedHandler); | |
}, | |
teardown: function (namespaces) { |
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
// Idea from http://dbaron.org/log/20100424-any | |
jQuery.expr[':'].any = function(el, i, match) { | |
return jQuery.find.matches(match[3], [el]).length > 0; | |
}; | |
jQuery('body :any(div, form) p'); // Same as jQuery('body div p, body form p') | |
jQuery('div:any(.foo,.bar)'); // Same as jQuery('div.foo, div.bar') |
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
$('.sound a').toggle(function(e) { | |
$("#slider-horizontal").css('margin', '10px').slideDown('fast'); | |
// Deactivate any actively toggled elements first: | |
// $(this).closest("div.podcast").each(ACTIVATE).siblings("div.podcast").each(DEACTIVATE) | |
$('.slider-vertical').eq(index).each(function(){ $(this).css('margin', '10px').slideDown('fast'); }) | |
.siblings('.slider-vertical').each(function(){ $(this).slideUp('fast'); }); | |
e.preventDefault(); | |
}, function(e) { |
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
$(document).ready(function() { | |
// Calling the Bubble Up plugin on the social icons in the header | |
$('#icon_container ul li img').bubbleup({tooltip: true, scale:66}); | |
// Create an array of URLS to mp3s which are stored in links with a class of 'audio' | |
var mp3s = $('.audio').map( function() { return this.href; } ).toArray(); | |
var clipIndex = 0; // setting Clip index variable | |
// install flowplayer into container |
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
{exp:twitter_timeline_oauth url="http://example.com" limit="3" twitter_refresh="20" auto_link="true" | |
link_usernames="true" link_hashtags="true"} | |
{if {count} == "0"} | |
<p>No results</p> | |
{/if} | |
<div class="tweet"> | |
<div class="info"><a href="http://www.twitter.com/{screen_name}">{screen_name}</a> / {created_at format="%g:%i %A %M %d"}</div> | |
<div class="text">{text}</div> | |
<div class="clear"></div> | |
</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
<noscript> | |
<h2>Comments:</h2> | |
{exp:disqust:get_thread_posts} | |
</noscript> | |
<!-- | |
You can return the number of posts by calling the plugin like {exp:disqust:get_thread_posts display_total_posts="yes"} | |
Example: |
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" src="/includes/jquery.cycle.lite.1.0.min.js"></script> | |
<script type="text/javascript"> | |
$(document).ready(function () { | |
var controls = $("#controls"), sliderContainer = $("#mainFocus"); | |
$("#slides").cycle({ | |
fx : "fade", | |
speed : "slow", | |
timeout : 12000, | |
next : "#next", | |
prev : "#prev", |
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
DELETE a, b | |
FROM `dt_orders` AS a, `dt_purchases` AS b | |
WHERE `Email_Address` = '[email protected]' | |
AND a.id = b.OrderID |
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
<xsl:variable name="firstChar" select="substring(/page/colour,1,1)"/> | |
<xsl:variable name="productColour"> | |
<xsl:value-of select="translate($firstChar,'abcdefghijklmnopqrstuvwxyz','ABCDEFGHIJKLMNOPQRSTUVWXYZ')"/><xsl:value-of select="substring-after(/page/colour,$firstChar)"/> | |
</xsl:variable> |
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
<!-- This will select the first nodename from a list of nodes dynamically for future reference --> | |
<xsl:variable name="nodename" select="'nodename'"/> | |
<xsl:value-of select="./*[local-name() = $nodename]" disable-output-escaping="yes" /> |