Skip to content

Instantly share code, notes, and snippets.

$(function()
{
$('#crafting-recipe').bind('expand',function()
{
$(this).children().slideDown(1000);
}).bind('collapse',function()
{
$(this).children().next().slideUp(1000);
});
});
var addSubSection=function(type,ssection,name)
{ //Support for sections by Wobak
var subsection=$('<div class="subsection"><div class="name"></div></div>');
subsection.css('height','20px');
subsection.find('.name').text(name);
$('.itemholder[type="' + ssection.type + '"]').append(subsection);
};
@flagoworld
flagoworld / gist:1454245
Created December 10, 2011 01:55
sliding menus
$(document).ready(function()
{
$('.navSub>li>span').mousedown(function()
{
if($(this).parent().find('.navSubSub').is(':hidden'))
{
$(this).addClass('open');
$(this).parent().find('.navSubSub').slideDown();
}else
{
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
<meta name="author" content="LTenuta" />
<link href="ryform.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="http://code.jquery.com/jquery-1.7.min.js"></script>
<script type="text/javascript">
$(function()
{
<?php
if(1)
{
?>
<h3>the if statement evaluates to true!</h3>
<?php
}else
{
?>
<h3>it wasnt true :[</h3>
@flagoworld
flagoworld / gist:1286182
Created October 14, 2011 03:31
Catching warnings
<?php
ini_set('track_errors', '1');
error_reporting(0);
echo 1/0;
echo $php_errormsg;
?>
@flagoworld
flagoworld / gist:1262644
Created October 4, 2011 20:06
"move is not defined"
(function($)
{
$.fn.beefSlider=function()
{
var el=this;
var move=true;
$(el).hover(function(){move=false;},function(){move=true;setTimeout('move()',10);});
// ^^^^^ in here
setTimeout('move()',10)
09-07 14:04:39.467: ERROR/AndroidRuntime(4537): Uncaught handler: thread main exiting due to uncaught exception
09-07 14:04:39.518: ERROR/AndroidRuntime(4537): java.lang.NullPointerException
09-07 14:04:39.518: ERROR/AndroidRuntime(4537): at com.google.android.maps.ItemizedOverlay.getItemsAtLocation(ItemizedOverlay.java:617)
09-07 14:04:39.518: ERROR/AndroidRuntime(4537): at com.google.android.maps.ItemizedOverlay.getItemAtLocation(ItemizedOverlay.java:586)
09-07 14:04:39.518: ERROR/AndroidRuntime(4537): at com.google.android.maps.ItemizedOverlay.onTap(ItemizedOverlay.java:443)
09-07 14:04:39.518: ERROR/AndroidRuntime(4537): at com.google.android.maps.OverlayBundle.onTap(OverlayBundle.java:83)
09-07 14:04:39.518: ERROR/AndroidRuntime(4537): at com.google.android.maps.MapView$1.onSingleTapUp(MapView.java:346)
09-07 14:04:39.518: ERROR/AndroidRuntime(4537): at android.view.GestureDetector.onTouchEvent(GestureDetector.java:506)
09-07 14:04:39.518: ERROR/AndroidRuntime(4537): at com.go
#chartMeters>div
{
margin: 10px 25px 0 25px;
float: left;
position: relative;
text-align: center;
color: #F85F00;
font-size: 13px;
}
.label
{
background-color: #f00;
margin: 0 10px 2px 10px;
position: relative;
}
<div class="label"><label>Email Address</label><label class="blue" style="position: absolute;right: 0;">Forgot Username</label></div>