Skip to content

Instantly share code, notes, and snippets.

@rhinocoders
rhinocoders / js-functions-basic.js
Last active August 29, 2015 14:08
JS-Functions-Basic
function nameOfFunction( arg ) {
alert( arg);
// Hello World
console.log( arguments[0] +". "+ arguments[1] +", "+ arguments[2] );
// Hello World. Its me, Ben
}
@rhinocoders
rhinocoders / js-functions.js
Last active August 29, 2015 14:08
JS-Gallery-Functions
function createGallery(element,path,file,alt){
var liString = "";
var i = 1;
var n = 8;
for(i; i <= n; i++)
{
liString += '<li><a href="#self" onclick="showImage(\''+file+i+'\');"><img class="photo" alt="'+alt+'-'+i+'" src="'+path+file+i+'.jpg"></a></li>\n';
@rhinocoders
rhinocoders / base-html-structure.html
Created September 12, 2014 15:55
Base HTML Structure
<!DOCTYPE html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
@rhinocoders
rhinocoders / names.html
Last active August 29, 2015 14:06
HTML Forms - Names
<form action="contactus.php" method="post">
<p>Name:</p>
<p><input type="text" name="name" value="Your name"></p>
<p>Comments: </p>
<p><textarea name="comments" rows="5" cols="20">Your comments</textarea></p>
<p>Are you:</p>
@rhinocoders
rhinocoders / select.html
Last active August 29, 2015 14:06
HTML Forms - Select
<select>
<option>Option 1</option>
<option>Option 2</option>
<option value="third option">Option 3</option>
</select>
@rhinocoders
rhinocoders / textarea.html
Last active August 29, 2015 14:06
HTML Forms - Textarea
<textarea rows="5" cols="20">A big load of text</textarea>
@rhinocoders
rhinocoders / formelement.html
Last active March 10, 2021 09:59
HTML Forms - Form Element
<form action="processingscript.php" method="post">
</form>
@rhinocoders
rhinocoders / html-tags.html
Created August 7, 2014 18:34
HTML5 Example Tags
<!DOCTYPE html>
<html>
<head>
<title>HTML5 Tags</title>
</head>
<body>
<!-- HTML5 Time & Date Tags -->
@rhinocoders
rhinocoders / intro-css-pseudo-list.css
Created August 5, 2014 16:03
CSS Pseudo Selectors
:active
:checked
:default
:dir()
:disabled
:empty
:enabled
:first
:first-child
:first-of-type
<!DOCTYPE html>
<html>
<head>
<title>HTML Headings</title>
</head>
<body>
<h1>Heading</h1>
<h2>Heading</h2>
<h3>Heading</h3>
<h4>Heading</h4>