Skip to content

Instantly share code, notes, and snippets.

function(e, t, n) {
"use strict";
NB.Liquid.PageFeature = function() {
this.init()
}
,
NB.Liquid.PageFeature.prototype = {
$featureSlidesContainer: null,
init: function() {
this.$featureSlidesContainer = e("#feature-slides"),
<?php
/* HOW TO WRITE A TAX QUERY
* ******************************************************/
$query_args = array(
'tax_query' => array(
array(
'taxonomy' => 'custom-taxonomy', // name of the taxonomy
'field' => 'slug', // what field is being queried (can be slug or id)
'terms' => 'hostingadvice-com' // the slug to match
),
/* LESS MIXIN FOR DISPLAY INLINE */
.inline {
display: inline-block;
*display: inline; // needed to display correctly in IE7
zoom: 1;
}
// partial application in javascript
// paste this code into your console and try it on this page!
function image_alert( ev, number ) {
// the following line shows that the ev object is available to the callback and that the second argument is available
// second argument (number) provided through partial application
alert( "IMAGE NUMBER " + number + " CLICKED! " + ev.target.src );
}
var applied_callback = function(num) { // this function will provide a number...
return function(e) { // and return another function that will take e (event object) as a parameter...