Posts

Showing posts from November 27, 2018

Tasmanien

Image
Tasmanien Flagge Wappen (Details) (Details) Basisdaten Teilstaat von: Commonwealth of Australia Hauptstadt: Hobart Fläche: 68.400 km² Einwohner: 524.700 (Dez 2017) [1] Bevölkerungsdichte: 7,53 Einwohner je km² ISO 3166-2: AU-TAS Zeitzone: AEST (UTC+10) Höchster Punkt: Mount Ossa 1617 m Offizielle Website: www.tas.gov.au Politik Gouverneur: Kate Warner (seit Dezember 2014) Premierminister: Will Hodgman (LP) (seit März 2014) Parlamentssitze: 5 (Repräsentantenhaus) 12 (Senat) Karte: Lage von Tasmanien Karte: Tasmanien Tasmanien ( englisch Tasmania , in der rekonstruierten Aborigines-Sprache Palawa Kani Lutriwita und in australisch-englisch häufig Tassie ; bis 1853 [2] Van-Diemens-Land ) ist eine zum Staat Australien gehörende Insel am östlichen Rand des Indischen Ozeans, die sich ungefähr 240 km südlich des australischen Festlands befindet. Der Begriff ste

Avoiding repetitive onclick statements

Image
up vote 2 down vote favorite 1 I have a website that has loads of questions. When you click the question, you get the answer. My code looks a little like this: $(document).on('click','#panel1question1',function(){ if (oneone % 2 == 0) { $(this).html(answerarraylvl1_js[2]); oneone++; console.log(oneone);} else { $(this).html(questionarraylvl1_js[2]); oneone++; console.log(oneone); } }); The problem is that I can have upto 75 questions displayed. I don't want to have to copy and paste a snippet for each of those div elements. It's going to generate a massive file. I also don't want to have a toggle variable for each question. I'd end up with a lot of variables. I do however, have naming conventions. Is there a way to