Skip to content

Instantly share code, notes, and snippets.

@AliMD

AliMD/gist:3759907

Created Sep 21, 2012
Embed
What would you like to do?
Code highlight test

Code highlight test

require 'redcarpet'
markdown = Redcarpet.new("Hello World!")
puts markdown.to_html
<?php
$foo = "foo";
$bar = "bar";
echo "Foo is $foo", PHP_EOL;
echo "Bar is $bar";
// comments
?>
<!DOCTYPE HTML>
<html lang="en-US">
<head>
	<meta charset="UTF-8" />
	<title>test</title>
</head>
<body>
	<div class="menu">
		<ul>
			<li><a href="page1.html">Page 1</a></li>
			<li><a href="page2.html">Page 2</a></li>
			<li><a href="page3.html">Page 3</a></li>
		</ul>
	</div>
</body>
</html>
*{
	padding: 0;
	margin: 0;
}

/* SlideShow
-------------------------------------------------- */

div.container{
	width       : 980px;
	margin      : 0 auto;
	padding-top : 1px;
}

div.slideshow{
	width      : 450px;
	height     : 324px;
	margin     : 30px auto 0;
	overflow   : hidden;
	position   : relative;
	background-image    : url('../images/loading.gif');
	background-repeat   : no-repeat;
	background-position : center center;
}
window.onload=function(){
	var slideshow = document.getElementsByClassName('slideshow').item(0);
	var lists = slideshow.getElementsByClassName('btns').item(0).getElementsByTagName('li');
	for (var i=0; i<lists.length; i++) {
		lists.item(i).onclick=function(){
			alert(i);
		}
	}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment