From 6bff2996aec1e243e8cf546fa63a62058db576c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Lucas?= Date: Tue, 15 Oct 2013 21:58:34 +0200 Subject: [PATCH] Avoid JSHint error. re #34 --- util.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/util.js b/util.js index 5b0ebf7..2e0802b 100644 --- a/util.js +++ b/util.js @@ -224,7 +224,9 @@ function handleFilterEvents () { ************************************************ */ -function updatePage (data) { +var updatePage, navigateTo; + +updatePage = function (data) { var result; filterList = {}; data.c = currentData.c; @@ -274,12 +276,12 @@ function updatePage (data) { } ]); - $('input[name=query]').bind('typeahead:selected', function(obj, datum) { + $('input[name=query]').bind('typeahead:selected', function(obj, datum) { navigateTo (datum.navlink); }); -} +}; -function navigateTo (url) { +navigateTo = function (url) { $("h1").append (" "); before = new Date (); var jsonurl = url.replace ("index", "getJSON"); @@ -294,7 +296,7 @@ function navigateTo (url) { updatePage (data); }); } -} +}; function link_Clicked (event) { var currentLink = $(this);