I made a html with 3 slideshows with the help of the Beginner Demo of JQuery Cycle Plugin (see below). But I don't know how I can get rid of the text which comes in view when the htlml is shown:
$('#s1').cycle({
fx: 'fade', speed: 1000
});
This text seems to be necessary for the code. How can I hide the code? Can anybody help?
This is the code:
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<title>JQuery Cycle Plugin - Beginner Demos</title>
<link rel="stylesheet" type="text/css" media="screen" href="../jq.css" />
<link rel="stylesheet" type="text/css" media="screen" href="cycle.css" />
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"></script>
<script type="text/javascript" src="http://malsup.github.com/chili-1.7.pack.js"></script>
<script type="text/javascript" src="http://malsup.github.com/jquery.cycle.all.js"></script>
<style type="text/css">
.pics {height: 200px; width: 200px; padding: 0; margin: 0; }
.pics img {padding: 0px; border: 0px solid white; background-color: red; width: 220px; height: 220px; top:0; left: 0 }
</style>
<script type="text/javascript">
$(function() {
// run the code in the markup!
$('td pre code').each(function() {
eval($(this).text());
});
});
</script>
</head>
<body>
<table cellspacing="20">
<tr>
<td>
<div id="s1" class="pics">
<img src="http://cloud.github.com/downloads/malsup/cycle/beach1.jpg" width="200" height="200" />
<img src="http://cloud.github.com/downloads/malsup/cycle/beach2.jpg" width="200" height="200" />
<img src="http://cloud.github.com/downloads/malsup/cycle/beach3.jpg" width="200" height="200" />
</div>
<pre><code class="mix">
$('#s1').cycle({
fx: 'fade', speed: 1000
});
</code></pre>
</td>
<td>
<div id="s2" class="pics">
<img src="http://cloud.github.com/downloads/malsup/cycle/beach1.jpg" width="200" height="200" />
<img src="http://cloud.github.com/downloads/malsup/cycle/beach2.jpg" width="200" height="200" />
<img src="http://cloud.github.com/downloads/malsup/cycle/beach3.jpg" width="200" height="200" />
</div>
<pre><code class="mix">
$('#s2').cycle({
fx: 'fade', speed: 5500
});
</code></pre>
</td>
<td>
<div id="s3" class="pics">
<img src="http://cloud.github.com/downloads/malsup/cycle/beach1.jpg" width="200" height="200" />
<img src="http://cloud.github.com/downloads/malsup/cycle/beach2.jpg" width="200" height="200" />
<img src="http://cloud.github.com/downloads/malsup/cycle/beach3.jpg" width="200" height="200" />
</div>
<pre><code class="mix">
$('#s3').cycle({
fx: 'fade', speed:3500
});
</code></pre>
</td>
</tr>
</table>
</body>
</html>