Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $('#search-city-button').on('click', () => {
- const searchString = $('#serach-city-input').val();
- weatherPage.render(searchString);
- });
- $('#favorite-button').on('click', () => {
- localStorage.setItem('#seach-city-input', searchString);
- });
- function fillValueFromStorege() {
- const storagedValue = localStorage.geItem('#serach-city-input');
- if (storagedValue) {
- $('#serach-city-input').val(storagedValue);
- $('#search-city-button').click();
- }
- }
- fillValueFromStorege();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement