diff options
Diffstat (limited to 'js/catalog-search.js')
| -rw-r--r-- | js/catalog-search.js | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/js/catalog-search.js b/js/catalog-search.js index b3c9c49e..fc39b1ce 100644 --- a/js/catalog-search.js +++ b/js/catalog-search.js @@ -17,6 +17,21 @@ var catalogSearch = function() { $threads = $('.threads .thread'), $searchLabel = $('<label for="catalog_search">Search: </label>'), $searchBox = $('<input id="catalog_search" type="text" placeholder="Search" />'); + function searchToggle() { + var button = $('#catalog_search_button'); + + if (!button.data('expanded')) { + button.data('expanded', '1'); + button.text('Close'); + $('.catalog_search').append(' <input id="search_field" style="border: inset 1px;">'); + $('#search_field').focus(); + } else { + button.removeData('expanded'); + button.text('Search'); + $('.catalog_search').children().last().remove(); + $('div[id="Grid"]>.mix').each(function () { $(this).css('display', 'inline-block'); }); + } + } $controls.append($searchLabel) .append($searchBox); |
