hi
Instead of the following, how do I wrap the objects up into one general object and pass the independent values into them i.e. the name of the div class?
Thanks in advance
Garrett
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-CA" lang="en-CA">
<head>
<title>jQuery Plugin: jQuery Timers</title>
<script type="text/javascript" src="http://jquery.offput.ca/js/jquery.js"></script>
<script type="text/javascript" src="http://jquery.offput.ca/js/jquery.timers.js"></script>
<script type="text/javascript">
//<![CDATA[
$(function() {
var demos = $("div.wrapper div.demos");
//===
$(".uncontrolled-interval1 p", demos).everyTime(1000,function(i) {
$(this).html(i);
});
//===
});
$(function() {
var demos = $("div.wrapper div.demos");
//===
$(".uncontrolled-interval2 p", demos).everyTime(1000,function(i) {
$(this).html(i+5);
});
//===
});
//]]>
</script>
</head>
<body>
<div class="wrapper">
<div class="demos">
<h3>Unbounded everyTime</h3>
<div class="uncontrolled-interval1">
<p>I am transient... *sigh*</p>
</div>
<h3>Unbounded everyTime</h3>
<div class="uncontrolled-interval2">
<p>I am transient... *sigh*</p>
</div>
</div>
</div>
</body>
</html>