diff options
| author | 8chan <admin@8chan.co> | 2015-02-20 01:51:06 -0800 |
|---|---|---|
| committer | czaks <marcin@6irc.net> | 2016-05-05 12:15:26 +0200 |
| commit | 5176377045d25ab00ed4653f980e9a95a17b0e31 (patch) | |
| tree | a08ae71b97697b7d576c0e6f9d243d4be0acc59c /js/catalog-search.js | |
| parent | 88f6088a429fb73d12805377b43c6b567d03a5db (diff) | |
Fix many features for Internet Explorer 9 and 10
Please don't use "dataset" in scripts anymore, it doesn't work in IE9 or 10. Instead use $.data
Diffstat (limited to 'js/catalog-search.js')
| -rw-r--r-- | js/catalog-search.js | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/js/catalog-search.js b/js/catalog-search.js index 17a8edac..ff9af785 100644 --- a/js/catalog-search.js +++ b/js/catalog-search.js @@ -34,16 +34,16 @@ if (active_page == 'catalog') { } function searchToggle() { - var button = $('#catalog_search_button')[0]; + var button = $('#catalog_search_button'); - if (!button.dataset.expanded) { - button.dataset.expanded = '1'; - button.innerText = 'Close'; + 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 { - delete button.dataset.expanded; - button.innerText = 'Search'; + button.removeData('expanded'); + button.text('Search'); $('.catalog_search').children().last().remove(); $('div[id="Grid"]>.mix').each(function () { $(this).css('display', 'inline-block'); }); } |
