Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/koirand/pulp.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/assets
diff options
context:
space:
mode:
authorkoirand <koirand.jp@gmail.com>2020-01-18 06:11:45 +0300
committerkoirand <koirand.jp@gmail.com>2020-01-18 06:11:45 +0300
commit01f9657d6163a4faa3209045c3afa2c2f40cc5ae (patch)
treedfbe6e36bf01ec843475b0c78c4ba796f0cf67ed /assets
parente69f90733e2dbc510a725759d7611a57acd75c05 (diff)
Fix bug that search icon image is not found.
Diffstat (limited to 'assets')
-rw-r--r--assets/js/search.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/assets/js/search.js b/assets/js/search.js
index 8a47ae4..1fe1bd0 100644
--- a/assets/js/search.js
+++ b/assets/js/search.js
@@ -112,11 +112,12 @@ const initUI = () => {
const query = $(event.currentTarget).val()
// Icon switching
+ const iconUrl = $('#searchBoxIcon').attr('src')
if (query.length) {
- $('#searchBoxIcon').attr('src', '../img/clear.png')
+ $('#searchBoxIcon').attr('src', iconUrl.replace('search.png', 'clear.png'))
$('#searchBoxIcon').css('cursor', 'pointer')
} else {
- $('#searchBoxIcon').attr('src', '../img/search.png')
+ $('#searchBoxIcon').attr('src', iconUrl.replace('clear.png', 'search.png'))
$('#searchBoxIcon').css('cursor', 'default')
}