Skip to content

Instantly share code, notes, and snippets.

@cirovladimir
Created January 11, 2013 15:45
Show Gist options
  • Save cirovladimir/4511650 to your computer and use it in GitHub Desktop.
Save cirovladimir/4511650 to your computer and use it in GitHub Desktop.
From 2b7c0b05ede5b223eacb7f33d7aa158a97053e27 Mon Sep 17 00:00:00 2001
From: cirovladimir <cirovladimir@gmail.com>
Date: Fri, 11 Jan 2013 09:17:36 -0600
Subject: [PATCH] fix iscroll
---
part07iscroll/index.html | 2 +-
part07iscroll/js/HomeView.js | 3 ++-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/part07iscroll/index.html b/part07iscroll/index.html
index 9846773..35afaea 100644
--- a/part07iscroll/index.html
+++ b/part07iscroll/index.html
@@ -8,7 +8,7 @@
<script id="home-tpl" type="text/x-handlebars-template">
<div class='header'><h1>Home</h1></div>
<div class='search-bar'><input class='search-key' type="search"/></div>
- <div class="wrapper"><ul class='employee-list'></ul></div>
+ <div class="scroll"><ul class='employee-list'></ul></div>
</script>
<script id="employee-li-tpl" type="text/x-handlebars-template">
diff --git a/part07iscroll/js/HomeView.js b/part07iscroll/js/HomeView.js
index fbc4cb2..1e64170 100644
--- a/part07iscroll/js/HomeView.js
+++ b/part07iscroll/js/HomeView.js
@@ -1,5 +1,7 @@
var HomeView = function(store) {
+ var self = this;
+
this.initialize = function() {
// Define a div wrapper for the view. The div wrapper is used to attach events.
this.el = $('<div/>');
@@ -12,7 +14,6 @@ var HomeView = function(store) {
};
this.findByName = function() {
- var self = this;
store.findByName($('.search-key').val(), function(employees) {
$('.employee-list').html(HomeView.liTemplate(employees));
if (self.iscroll) {
--
1.7.9.5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment