| 123456789101112131415161718192021222324252627282930313233 |
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <title></title>
- <meta charset="utf-8">
- <script src="bind.js"></script>
- <script src="../../../dist/seed.js"></script>
- </head>
- <body>
- <div id="hi" sd-test sd-test2>
- </div>
- <p class="one"></p>
- <p class="two"></p>
- <script>
- var a = new Seed({
- el: '#hi',
- directives: {
- test: {
- bind: function () {
- document.querySelector('.one').textContent = 'bind'
- },
- unbind: function () {
- document.querySelector('.one').textContent = 'unbind'
- }
- },
- test2: function () {
- document.querySelector('.two').textContent = 'bind'
- }
- }
- })
- </script>
- </body>
- </html>
|