                         .replace('%desc', $desc)
                         .replace '%name', item.name
                 $("#search-result").append $ $_tpl
+            else if $("#search-result").children().length == 0
+              $("#search-result").css 'display', 'none'
   do search
</div>
"""
          for item in results
            if item.name.search(regex) > -1 || 
              item.desc.search(regex) > -1 || 
              (item.tags? && item.tags.search(regex) > -1) ||
              (item.lang? && item.lang.search(regex) > -1) ||
              (item.type? && item.type.search(regex) > -1)
                $desc = item.name
                $desc += " (#{item.type})" if display_type
                $_tpl = $tpl

        $("#search").keyup (e) ->
          $("#search-result").empty()
          string = $(e.target).val().toLowerCase()
          if string.length <= 0
            $("#search-result").css 'display', 'none'
            return
          $("#search-result").css 'display', 'block'
          regex = new RegExp string, "i"
          $tpl ="""
<div class='result'>
