carra1.1
the first fiddle
by erichbschulz
HTML
<h1><a href="http://google.com">Guineapig</a></h1>
<div id="intro">
<p>This fiddle shows basic:</p>
<ul>
<li>html and css</li>
<li>javascript alert, prompt and variables</li>
<li>jqery event binding</li>
</ul>
<p>This is a paragraph</p>
<p>This is a <a href="http://google.com">link</a>
</p>
</div>
<div id="lucy">
<h3>This is the title</h3>
<p id='fish'>This is a fish</p>
<h5>This is the title</h5>
</div>
<p>This is a paragraphy</p>
<ul>
<li>item 1</li>
<li>item 0</li>
<li>item 2</li>
</ul>
<p>I need to learn: what is the difference between a span and a div. And also what is the difference between a "class" and an "id"</p>
CSS
body {
background: #ffe682
}
p {
color: blue
}
h1 {
color: pink
}
#lucy {
background: red
}
#fish {
background: purple
}
#inro {
background: grey;
color: black
}
JavaScript
// $("#fish").click(dostuff);
$("#fish").dblclick(dootherstuff);
function dostuff() {
alert("i am here");
}
function dootherstuff() {
var x = prompt("what you want?");
$('h1').text(x);
}