Skip to content

Instantly share code, notes, and snippets.

View gre's full-sized avatar
3 cups required

@greweb gre

3 cups required
View GitHub Profile
@gre
gre / canvas_exemple.html
Created March 13, 2011 15:22
Canvas exemple used in a video tutorial
<html>
<head>
<style>
body {
background: #ddd;
}
canvas {
background: #fff;
}
</style>
@gre
gre / wp-polls-popup.js
Created January 23, 2011 18:30
Wordpress - used with WP Polls plugin - Display a popup for people haven't vote for the current polls (you must have polls in widget)
/// AUTHOR : Gaetan Renaudeau, http://gaetanrenaudeau.fr/, pro at grenlibre (DoT) fr
(function($){
if(!jQuery) return; // we need jQuery
var pollWidget = $('.widget_polls-widget')
if(pollWidget.size() && $('input:visible', pollWidget).size()) {
var clone = $(pollWidget).clone().removeClass('widget_polls-widget');
$('a', clone).remove();
$('input', clone).click(function(){
$('.widget_polls-widget input[value='+$(this).val()+']').attr('checked', 'checked');
@gre
gre / index.html
Created November 15, 2010 08:54
HTML Slider with CSS Transitions
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>CSS Transition demo</title>
<link rel="stylesheet" type="text/css" media="screen" href="main.css" />
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<style>
/* slide transition part */
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript" src="jquery-1.4.2.min.js"></script>
<style>
body {
color: #333;
background: #EEE;
margin: 30px;
}