Skip to content

Instantly share code, notes, and snippets.

@yicui
yicui / assignments.html
Last active December 11, 2015 11:58
A simple static website with unified styling. The placeholder text is created by a Lorem Ipsum generator (http://www.lipsum.com/). The icon used in the navigation bar is provided by http://glyphicons.com/
<!DOCTYPE html>
<html>
<head>
<title>Web Development: Assignments</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="keywords" content="web development, styling, assignments" />
<meta name="description" content="Assignments of the web development course" />
<link rel="stylesheet" type="text/css" href="style.css"/>
<link rel="stylesheet" type="text/css" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.0/themes/base/jquery-ui.css"/>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script>
@yicui
yicui / styledwebpage.html
Last active December 11, 2015 04:28
A simple step-by-step example of webpage styling
<!DOCTYPE html>
<html>
<head>
<title>Webpage Styling</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="keywords" content="web, CSS, styling, div" />
<meta name="description" content="A simple step-by-step example of webpage styling" />
<style>
#header {
background-color:red;
@yicui
yicui / hint.js
Last active December 10, 2015 23:18
Basic HTML elements and AJAX
$(document).ready(function(){
var openText;
$(".hint").keyup(function() {
openText = $(this).next();
if ($(this).val() == "")
openText.empty();
else
$.get($(this).attr("href"),
{
input:$(this).val(),