diff options
author | Rob Loach <robloach@gmail.com> | 2014-10-07 12:02:21 -0400 |
---|---|---|
committer | Rob Loach <robloach@gmail.com> | 2014-10-07 12:02:21 -0400 |
commit | 79a4179e1cd4f873fe4144dcf47425e773cb07f6 (patch) | |
tree | a1a52b8fbe931988d9a65883033cd8e2dcc5d341 /example | |
parent | 18dad06c6b8901314fba8eb5508673b30b82eb0a (diff) | |
download | jquery-once-79a4179e1cd4f873fe4144dcf47425e773cb07f6.zip jquery-once-79a4179e1cd4f873fe4144dcf47425e773cb07f6.tar.gz jquery-once-79a4179e1cd4f873fe4144dcf47425e773cb07f6.tar.bz2 |
Remove function callback
Diffstat (limited to 'example')
-rw-r--r-- | example/index.html | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/example/index.html b/example/index.html index 0c2505f..4b73760 100644 --- a/example/index.html +++ b/example/index.html @@ -9,14 +9,10 @@ <p>This is some text, which should stay green.</p> <script> // Change the color of the text to green. - $('p').once('changecolor', function() { - $(this).css('color', 'green'); - }); + $('p').once('changecolor').css('color', 'green'); // Attempt to change the color again. - $('p').once('changecolor', function() { - $(this).css('color', 'red'); - }); + $('p').once('changecolor').css('color', 'red'); </script> </body> </html> |