Login   Register  
Icontem

File: example.html

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Arturs Sosins  >  Guitar neck  >  example.html  >  Download  
File: example.html
Role: Example script
Content type: text/plain
Description: Example script with two guitar necks
Class: Guitar neck
Display chords on a guitar neck
Author: By
Last change: credits changed
Date: 2011-04-25 12:04
Size: 2,083 bytes
 

Contents

Class file image Download
<!--
/*************************************************************
 * This script is developed by Arturs Sosins aka ar2rsawseen, http://webcodingeasy.com/
 * Fee free to distribute and modify code, but keep reference to its creator
 *
 * Guitar neck class can generate guitar neck with specified string and fret count
 * and with or without user graphic, display chords in right or left hand modes
 *
 * For more information, examples and online documentation visit: 
 * http://webcodingeasy.com/JS-classes/Display-guitar-chords-on-guitar-neck
**************************************************************/
-->
<html>
<head>
</head>
<body>
<div id='guitar'>
</div>
<p>
	<a href='#' onclick='graphic.switch_hand();'>
		Switch hand
	</a>
	&nbsp;&nbsp;&nbsp;
	<a href='#' onclick='graphic.set_hand("right");'>
		Set right hand
	</a>
	&nbsp;|&nbsp;|&nbsp;
	<a href='#' onclick='graphic.set_hand("left");'>
		Set left hand
	</a>
</p>
<p>&nbsp;</p>
<div id='guitar2'>
</div>
<p>
	<a href='#' onclick='plain.switch_hand();'>
		Switch hand
	</a>
	&nbsp;&nbsp;&nbsp;
	<a href='#' onclick='plain.set_hand("right");'>
		Set right hand
	</a>
	&nbsp;|&nbsp;|&nbsp;
	<a href='#' onclick='plain.set_hand("left");'>
		Set left hand
	</a>
</p>
<p>&nbsp;</p>
<p>
	<a href='#' onclick='graphic.chord([3,0,0,0,2,3]);'>
		With graphic(G major)
	</a>
	&nbsp;&nbsp;&nbsp;
	<a href='#' onclick='plain.chord([3,0,0,0,2,3]);'>
		Without graphic(G major)
	</a>
</p>
<p>
	<a href='#' onclick='graphic.chord([0,1,2,2,0,"x"]);'>
		With graphic(A minor)
	</a>
	&nbsp;&nbsp;&nbsp;
	<a href='#' onclick='plain.chord([0,1,2,2,0,"x"]);'>
		Without graphic(A minor)
	</a>
</p>
<script type="text/javascript" src="./guitar_neck.packed.js" ></script>
<script type="text/javascript">
//guitar neck with graphic
var graphic = new guitar_neck("guitar", {use_graphic : true});
//guitar neck without graphic
var plain = new guitar_neck("guitar2", {
	width : 30,
	height : 20,
	string_count : 10,
	use_graphic: false
});
</script>
</body>
</html>