Skip to content

Instantly share code, notes, and snippets.

@maxim75
maxim75 / gist:975729
Created May 17, 2011 01:40
Splitter for panel resizing
<!DOCTYPE html>
<html>
<head>
<title></title>
<style>
.leftpane, .rightpane
{
position: absolute;
height: 100px;
background-color: #EEEEEE;
@maxim75
maxim75 / jquery_templates.html
Created May 17, 2011 03:33
Using jQuery templates
<!DOCTYPE HTML>
<html lang="en">
<head>
<meta charset="utf-8">
<title>&star; aaa</title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"></script>
<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.10/themes/base/jquery-ui.css" id="theme">
<script src="http://ajax.microsoft.com/ajax/jquery.templates/beta1/jquery.tmpl.js" id="theme"></script>
<style>
</style>
@maxim75
maxim75 / gist:975893
Created May 17, 2011 03:36
Google Chart API - Bar chart
<html>
<head>
<title> Vertical bar chart </title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6/jquery.min.js" type="text/javascript"></script>
</head>
<body>
<img id="chart" width="380" height="220" alt="H" />
<script>
@maxim75
maxim75 / rollover.html
Created May 18, 2011 04:48
Rollover menu (somewhat similar to accordion)
<!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>
<style>
ul.acclist
{
border: solid 1px Black;
list-style: none;
@maxim75
maxim75 / freebase_suggest.js
Created May 19, 2011 04:57
Add autocomplete to text field on any website with bookmarklet
(function(){
var css_selector = 'input.tinput';
var type = '/location/australian_suburb';
if (!(window.jQuery)) {
script = document.createElement( 'script' );
script.src = 'http://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js';
document.body.appendChild(script);
@maxim75
maxim75 / gist:980251
Created May 19, 2011 05:36
Leaflet library usage example
<!DOCTYPE html>
<html>
<head>
<title>Leaflet Quick Start Guide Example</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="../dist/leaflet.css" />
<!--[if lte IE 8]><link rel="stylesheet" href="../dist/leaflet.ie.css" /><![endif]-->
</head>
<body>
@maxim75
maxim75 / deferred.js
Created May 19, 2011 05:51
Using deferred in jQuery
<html>
<head>
<style>
#map
{
width: 100px;
height: 100px;
}
</style>
@maxim75
maxim75 / disqus.js
Created May 19, 2011 05:52
Loading disqus on page load
<html>
<head>
<title>A</title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js"></script>
</head>
<body>
<button id="test">Test</button>
<div style="float: left">
@maxim75
maxim75 / exif.html
Created May 19, 2011 06:03
Reading EXIF info from image with JavaScript
<!DOCTYPE html>
<html lang="en">
<head>
<title>h5</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.js"></script>
<script src="exif.js"></script>
<style>
#holder { border: 1px dashed #ccc; width: 100px; height: 100px; margin: 20px auto;}
#holder.hover { border: 1px dashed #333; }
#result .property { width: 100px; }
@maxim75
maxim75 / xml.html
Created May 19, 2011 07:01
XML file upload and parsing using File API and DOM parser
<!DOCTYPE html>
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js"></script>
<style>
</style>
<script>
function loadFile() {
var input, file, fr;