Skip to content

Instantly share code, notes, and snippets.

@andrew8088
andrew8088 / jquery_mobile.html
Created October 17, 2010 01:42
playing with jQuery Mobile
<!DOCTYPE html>
<html>
<head>
<title>Page Title some change </title>
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.0a1/jquery.mobile-1.0a1.min.css" />
<script src="http://code.jquery.com/jquery-1.4.3.min.js"></script>
<script src="http://code.jquery.com/mobile/1.0a1/jquery.mobile-1.0a1.min.js"></script>
</head>
<body>
(function ($) {
$.fn.chromeFade = function (opts) {
var defs = { msTilFade : 2000, fadeSpeed : 500, fadeTo : 0.01 },
sets = $.extend({}, defs, opts),
elems = this,
fadeFunc = function () {
elems.fadeTo(sets.fadeSpeed, sets.fadeTo);
},
fadeTimer = setTimeout(fadeFunc, sets.msTilFade);
<!DOCTYPE html>
<html>
<head>
<title>jQuery Templating Demo</title>
<style type="text/css">
html {
background:#f3f3f3;
font: 13px/1.5 helvetica, arial, san-serif;
}
ul {
sample gist
var array = ["one", "two", "three", "four", "five"];
document.writeln(array + "<br />");
var newArray = shuffle(array);
document.writeln(newArray);
function shuffle (arr) {
var copy = arr.concat(),