Skip to content

Commit

Permalink
fix clear-completed (#364)
Browse files Browse the repository at this point in the history
  • Loading branch information
flashdesignory authored Jan 31, 2024
1 parent 285e32d commit 7b1b81e
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jQuery(function ($) {
bindEvents: function () {
$('#new-todo').on('keyup', this.create.bind(this));
$('#toggle-all').on('change', this.toggleAll.bind(this));
$('#footer').on('click', '#clear-completed', this.destroyCompleted.bind(this));
$('#footer').on('click', '.clear-completed', this.destroyCompleted.bind(this));
$('#todo-list')
.on('change', '.toggle', this.toggle.bind(this))
.on('dblclick', 'label', this.edit.bind(this))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ <h1>todos</h1>
<a {{#eq filter 'completed'}}class="selected"{{/eq}}href="#/completed">Completed</a>
</li>
</ul>
{{#if completedTodos}}<button id="clear-completed">Clear completed</button>{{/if}}
{{#if completedTodos}}<button class="clear-completed">Clear completed</button>{{/if}}
</script>
<!-- <script src="node_modules/todomvc-common/base.js"></script> -->
<script src="jquery.min.js"></script>
Expand Down
2 changes: 1 addition & 1 deletion resources/todomvc/architecture-examples/jquery/dist/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jQuery(function ($) {
bindEvents: function () {
$('#new-todo').on('keyup', this.create.bind(this));
$('#toggle-all').on('change', this.toggleAll.bind(this));
$('#footer').on('click', '#clear-completed', this.destroyCompleted.bind(this));
$('#footer').on('click', '.clear-completed', this.destroyCompleted.bind(this));
$('#todo-list')
.on('change', '.toggle', this.toggle.bind(this))
.on('dblclick', 'label', this.edit.bind(this))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ <h1>todos</h1>
<a {{#eq filter 'completed'}}class="selected"{{/eq}}href="#/completed">Completed</a>
</li>
</ul>
{{#if completedTodos}}<button id="clear-completed">Clear completed</button>{{/if}}
{{#if completedTodos}}<button class="clear-completed">Clear completed</button>{{/if}}
</script>
<!-- <script src="node_modules/todomvc-common/base.js"></script> -->
<script src="jquery.min.js"></script>
Expand Down
2 changes: 1 addition & 1 deletion resources/todomvc/architecture-examples/jquery/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ <h1>todos</h1>
<a {{#eq filter 'completed'}}class="selected"{{/eq}}href="#/completed">Completed</a>
</li>
</ul>
{{#if completedTodos}}<button id="clear-completed">Clear completed</button>{{/if}}
{{#if completedTodos}}<button class="clear-completed">Clear completed</button>{{/if}}
</script>
<!-- <script src="node_modules/todomvc-common/base.js"></script> -->
<script src="node_modules/jquery/dist/jquery.min.js"></script>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"name": "todomvc-jquery",
"private": true,
"scripts": {
"dev": "http-server . -p 7001 -c-1 --cors",
"build": "node scripts/build.js",
"serve": "http-server ./dist -p 7002 -c-1 --cors"
},
Expand Down
2 changes: 1 addition & 1 deletion resources/todomvc/architecture-examples/jquery/src/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jQuery(function ($) {
bindEvents: function () {
$('#new-todo').on('keyup', this.create.bind(this));
$('#toggle-all').on('change', this.toggleAll.bind(this));
$('#footer').on('click', '#clear-completed', this.destroyCompleted.bind(this));
$('#footer').on('click', '.clear-completed', this.destroyCompleted.bind(this));
$('#todo-list')
.on('change', '.toggle', this.toggle.bind(this))
.on('dblclick', 'label', this.edit.bind(this))
Expand Down

0 comments on commit 7b1b81e

Please sign in to comment.