Message from JavaScript discussions

October 2020

— JS:

$('[lang="it"]').hide();

$('#lang-switch').change(function () {
var lang = $(this).val();
switch (lang) {
case 'en':
$('[lang]').hide();
$('[lang="en"]').show();
break;
default:
$('[lang]').hide();
$('[lang="en"]').show();
}
});

Dropdown list:
<select id="lang-switch">
<option value="en">English</option>
<option value="it">Italiano</option>

Message permanent page

— 

To do this i had to use a setTimeout, is there a better way?
sorry for the screen but the code was too small for a bastebin, i think

— </select>

— rreliable So I tag the id in the text and when I select from the list it changes the language. It works perfectly, I just need buttons instead of a list

Message permanent page

— I believe you can use classes and then add the animation as css

— The start point of the circle need to be dinamic

— Yes you can still set that, but add a class for the animation and style

— Hmm
The second circle also need to start at the same point so in the end I'll only change 1 line of code

Message permanent page

— Toxic wastes anyone🤨 be honest with yourself🤤 boring shouldn't win

— Hi
Please can some one help me out,
I'm a beginner in JavaScript and wanted to ask for help on how I can make my web page remember choices, options, and other stuff on reload using JavaScript

Message permanent page

— Learn to use browser storage

— There's localStorage, SessionStorage and indexedDB