Skip to content

Instantly share code, notes, and snippets.

View fleeting's full-sized avatar
🐢
As productive as this turtle.

James Fleeting fleeting

🐢
As productive as this turtle.
View GitHub Profile
$(".delete").click(function() {
$(this + " span").dialog({
resizable: false,
height: 140,
modal: true,
show: 'fold',
buttons: {
'Delete Time': function() {
localStorage.removeItem($(this).attr("rel"));
getAllItems();
$(".content img").each(function() {
if($(this).css('float') == "right")
$(this).addClass("right");
else if($(this).css('float') == "left")
$(this).addClass("left");
});
<?php
function cart_add() {
if (empty($_SESSION["cart"]))
$_SESSION["cart"] = array();
$aProduct = $this->model->getProduct($this->_urlVars->dynamic["id"]);
if (array_key_exists($aProduct["id"], $_SESSION["cart"])) {
$_SESSION["cart"][$aProduct["id"]]["quantity"]++;
} else {
<?php
function cart() {
$aProducts = $_SESSION["cart"];
$sSubTotal = 0;
foreach($_SESSION["cart"] as $aProduct) {
if (!empty($aProduct["sale_price"]))
$sSubTotal = $sSubTotal + $aProduct["sale_price"];
else
$sSubTotal = $sSubTotal + $aProduct["price"];
drop: function(event, ui) {
$("#photos").sortable('cancel');
$(this).addClass('ui-state-highlight').html($("img", ui.draggable).clone());
$("input[name=default_photo]").attr("value", $(ui.draggable).attr("id"));
}
//....
{foreach from=$aListFields item=aListField}
<label>{if $aListField.req == 1}*{/if}{$aListField.name}</label><br />
{if $aListField.field_type == "text" || $aListField.field_type == "email" || $aListField.field_type == "url" || $aListField.field_type == "phone" || $aListField.field_type == "address" || $aListField.field_type == "number"}
<input type="text" name="{$aListField.tag}" value="{if !empty($aMember.merges.{$aListField.tag})}{$aMember.merges.{$aListField.tag}}{else}{$aListField.default}{/if}"><br />
{elseif $aListField.field_type == "radio"}
{foreach from=$aListField.choices item=aChoice}
<input type="radio" name="{$aListField.tag}" value="{$aChoice}"> {$aChoice}<br />
{/foreach}
{elseif $aListField.field_type == "dropdown"}
<select name="{$aListField.tag}">
var animateDelay = 0;
var animationDelay = 2350;
function slideImage() {
$("#slider .currentSlide").removeClass("currentSlide").next().addClass("currentSlide").parent().find('li:first-child').animate({
width: "0px"
}, 2500, function() {
li = $(this).detach();
li.width("960").find("img").css("margin", "0px");
li.appendTo("#slider");
var animateDelay = 0;
var animationDelay = 2500;
function switchImage() {
$("#slider .currentSlide").fadeOut(1300, function() {
$(this).removeClass("currentSlide").prev().addClass("currentSlide");
li = $(this).detach();
li.removeAttr("style").find("img").removeAttr("style");
li.prependTo("#slider");
@font-face {
font-family: 'QuicksandBook';
src: url('Quicksand_Book-webfont.eot');
src: url('Quicksand_Book-webfont.eot?#iefix') format('embedded-opentype'),
url('Quicksand_Book-webfont.woff') format('woff'),
url('Quicksand_Book-webfont.ttf') format('truetype'),
url('Quicksand_Book-webfont.svg#QuicksandBook') format('svg');
font-weight: normal;
font-style: normal;
@font-face {
font-family: 'QuicksandBook';
src: url('Quicksand_Book-webfont.eot');
src: url('Quicksand_Book-webfont.eot?#iefix') format('embedded-opentype'),
url('Quicksand_Book-webfont.woff') format('woff'),
url('Quicksand_Book-webfont.ttf') format('truetype'),
url('Quicksand_Book-webfont.svg#QuicksandBook') format('svg');
font-weight: normal;
font-style: normal;