Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

use the views 'ui' to DRY the element selectors

  • Loading branch information...
commit 13aa49a95acc904e75597941430e7fe9e91b1a22 1 parent d677783
@evdb evdb authored
Showing with 5 additions and 1 deletion.
  1. +5 −1 public/js/app.js
View
6 public/js/app.js
@@ -70,10 +70,14 @@
"submit form": "doSearch"
},
+ ui: {
+ isbnInput: "input[name=isbn]"
+ },
+
doSearch: function (e) {
e.preventDefault();
- var isbn = this.$("input[name=isbn]").val();
+ var isbn = this.ui.isbnInput.val();
appRouter.navigate("isbn/" + isbn, {trigger: true});
}
Please sign in to comment.
Something went wrong with that request. Please try again.