|
Lines 262-268
function setPlaceholder() {
Link Here
|
| 262 |
let search_placeholder = $("#masthead_search option:selected").data( |
262 |
let search_placeholder = $("#masthead_search option:selected").data( |
| 263 |
"placeholder" |
263 |
"placeholder" |
| 264 |
); |
264 |
); |
|
|
265 |
let clearButton = $(".clear-search"); |
| 266 |
|
| 265 |
$("#translControl1").attr("placeholder", search_placeholder); |
267 |
$("#translControl1").attr("placeholder", search_placeholder); |
|
|
268 |
|
| 269 |
if ($("#translControl1").val() == "") { |
| 270 |
clearButton.hide(); |
| 271 |
} |
| 272 |
|
| 273 |
clearButton.click(function () { |
| 274 |
$("#translControl1").val("").focus(); |
| 275 |
$(this).hide(); |
| 276 |
}); |
| 277 |
|
| 278 |
$("#translControl1").on("input", function () { |
| 279 |
if ($(this).val() !== "") { |
| 280 |
clearButton.show(); |
| 281 |
} else { |
| 282 |
clearButton.hide(); |
| 283 |
} |
| 284 |
}); |
| 266 |
} |
285 |
} |
| 267 |
|
286 |
|
| 268 |
$(document).ready(function () { |
287 |
$(document).ready(function () { |
| 269 |
- |
|
|