|
Lines 253-266
function setPlaceholder(){
Link Here
|
| 253 |
let search_placeholder = $("#masthead_search option:selected").data("placeholder"); |
253 |
let search_placeholder = $("#masthead_search option:selected").data("placeholder"); |
| 254 |
let clearButton = $('<span class="clear-search"><i class="fa-sharp fa-regular fa-circle-xmark"></i></span>'); |
254 |
let clearButton = $('<span class="clear-search"><i class="fa-sharp fa-regular fa-circle-xmark"></i></span>'); |
| 255 |
|
255 |
|
| 256 |
$("#translControl1").attr("placeholder", search_placeholder ).after(clearButton); |
256 |
$("#translControl1").attr("placeholder", search_placeholder).after(clearButton); |
| 257 |
|
257 |
|
| 258 |
clearButton.click(function() { |
258 |
clearButton.click(function() { |
| 259 |
$("#translControl1").val('').focus(); |
259 |
$("#translControl1").val('').focus(); |
| 260 |
$(this).hide(); |
260 |
$(this).hide(); |
| 261 |
}); |
261 |
}); |
| 262 |
|
262 |
|
| 263 |
$("#translControl1").on('input', function() { |
263 |
$("#translControl1").on('input', function() { |
| 264 |
if ($(this).val() !== '') { |
264 |
if ($(this).val() !== '') { |
| 265 |
clearButton.show(); |
265 |
clearButton.show(); |
| 266 |
} else { |
266 |
} else { |
| 267 |
- |
|
|