<!--
/*************************************************************
* 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>
<a href='#' onclick='graphic.set_hand("right");'>
Set right hand
</a>
| |
<a href='#' onclick='graphic.set_hand("left");'>
Set left hand
</a>
</p>
<p> </p>
<div id='guitar2'>
</div>
<p>
<a href='#' onclick='plain.switch_hand();'>
Switch hand
</a>
<a href='#' onclick='plain.set_hand("right");'>
Set right hand
</a>
| |
<a href='#' onclick='plain.set_hand("left");'>
Set left hand
</a>
</p>
<p> </p>
<p>
<a href='#' onclick='graphic.chord([3,0,0,0,2,3]);'>
With graphic(G major)
</a>
<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>
<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> |