Skip to content

Instantly share code, notes, and snippets.

@solidpple
Created August 15, 2016 06:04

Revisions

  1. solidpple created this gist Aug 15, 2016.
    26 changes: 26 additions & 0 deletions search.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,26 @@
    /**
    * Created by banana on 8/15/16.
    */
    requirejs([ "common" ], function () {
    requirejs([ "loglevel" ], function (log) {
    var _searchBtnRef = null;
    var _searchKeywordRef = null;

    var _initView = function() {
    _searchKeywordRef = $("#search_keyword");
    _searchBtnRef = $("#search");
    _bindEvent();
    }
    var _bindEvent = function() {
    _searchBtnRef.click(function() {
    var searchKeyword = _searchKeywordRef.val();
    log.info("search keyword : " + searchKeyword);
    });
    }

    var _init = function () {
    _initView();
    };
    _init();
    });
    });