summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRob Loach <robloach@gmail.com>2014-09-26 15:24:21 -0700
committerRob Loach <robloach@gmail.com>2014-09-26 15:24:21 -0700
commit59e856faabc33bdf4a69289904d91c9e44d03ac6 (patch)
tree440e64731b786b10a55f68124be7d7fca044d453
parentc696fcfaffb0bbc02ad1407ff5baa6086f8ba510 (diff)
downloadjquery-once-59e856faabc33bdf4a69289904d91c9e44d03ac6.zip
jquery-once-59e856faabc33bdf4a69289904d91c9e44d03ac6.tar.gz
jquery-once-59e856faabc33bdf4a69289904d91c9e44d03ac6.tar.bz2
Update tests and documentation
-rw-r--r--example/index.html14
-rw-r--r--package.json2
-rw-r--r--test/index.html2
3 files changed, 12 insertions, 6 deletions
diff --git a/example/index.html b/example/index.html
index fa009dc..0c2505f 100644
--- a/example/index.html
+++ b/example/index.html
@@ -1,16 +1,22 @@
<!DOCTYPE html>
<html>
<head>
- <script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
- <script src="../jquery.once.min.js"></script>
+ <script src="http://code.jquery.com/jquery-2.1.1.min.js"></script>
+ <script src="../jquery.once.js"></script>
</head>
<body>
<h1>jQuery Once</h1>
- <p>This is some text, which is turned green only once.</p>
+ <p>This is some text, which should stay green.</p>
<script>
- $('p').once('greenify', function() {
+ // Change the color of the text to green.
+ $('p').once('changecolor', function() {
$(this).css('color', 'green');
});
+
+ // Attempt to change the color again.
+ $('p').once('changecolor', function() {
+ $(this).css('color', 'red');
+ });
</script>
</body>
</html>
diff --git a/package.json b/package.json
index 28a2610..6ae6a41 100644
--- a/package.json
+++ b/package.json
@@ -1,7 +1,7 @@
{
"name": "jquery-once",
"description": "jQuery Once Plugin.",
- "version": "1.2.6",
+ "version": "2.0.0-alpha.1",
"keywords": [
"jquery"
],
diff --git a/test/index.html b/test/index.html
index 6f1ed00..887b696 100644
--- a/test/index.html
+++ b/test/index.html
@@ -26,7 +26,7 @@
</div>
- <script src="http://code.jquery.com/jquery-1.10.0.js"></script>
+ <script src="http://code.jquery.com/jquery-2.1.1.js"></script>
<script src="http://code.jquery.com/qunit/qunit-1.11.0.js"></script>
<script src="../jquery.once.js"></script>
<script src="test.js"></script>