-
Notifications
You must be signed in to change notification settings - Fork 0
/
Home.js
132 lines (131 loc) · 7.92 KB
/
Home.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
function display(i) {
document.getElementById("symbol").innerHTML = elements[i][0];
document.getElementById("eleName").innerHTML = elements[i][1];
document.getElementById("atmNo").innerHTML = `Atomic Number: ${elements[i][2]}`;
document.getElementById("atmMass").innerHTML = `Atomic Mass: ${elements[i][3]}`;
$(".e1").css({"border": `4px solid ${elements[i][4]}`,
"color": elements[i][4]});
$("#symbol").css({"padding": "25px 0 0 0",
"font-size": "100px",
"font-weight": "bold",});
}
var elements = [
['H','Hydrogen', '1', '1.00794', '#3a86ff'],
['He','Helium', '2', '4.002602', '#ff006e'],
['Li','Lithium', '3', '6.941', '#43aa8b'],
['Be','Beryllium', '4', '9.012182', '#f94144'],
['B','Boron', '5', '10.811', '#f9c74f'],
['C','Carbon', '6', '12.0107', '#3a86ff'],
['N','Nitrogen', '7', '14.0067', '#3a86ff'],
['O','Oxygen', '8', '15.9994', '#3a86ff'],
['F','Fluorine', '9', '18.9984032', '#3a86ff'],
['Ne','Neon', '10', '20.1797', '#ff006e'],
['Na','Sodium', '11', '22.98976928', '#43aa8b'],
['Mg','Magnesium', '12', '24.3050', '#f94144'],
['Al','Aluminium', '13', '26.9815386', '#90be6d'],
['Si','Silicon', '14', '28.0855', '#f9c74f'],
['P','Phosphorus', '15', '30.973762', '#3a86ff'],
['S','Sulfur', '16', '32.065', '#3a86ff'],
['Cl','Chlorine', '17', '35.453', '#3a86ff'],
['Ar','Argon', '18', '39.948', '#ff006e'],
['K','Potassium', '19', '39.0983', '#43aa8b'],
['Ca','Calcium', '20', '40.078', '#f94144'],
['Sc','Scandium', '21', '44.955912', '#7b2cbf'],
['Ti','Titanium', '22', '47.867', '#7b2cbf'],
['V','Vanadium', '23', '50.9415', '#7b2cbf'],
['Cr','Chromium', '24', '51.9961', '#7b2cbf'],
['Mn','Manganese', '25', '54.938045', '#7b2cbf'],
['Fe','Iron', '26', '55.845', '#7b2cbf'],
['Co','Cobalt', '27', '58.933195', '#7b2cbf'],
['Ni','Nickel', '28', '58.6934', '#7b2cbf'],
['Cu','Copper', '29', '63.546', '#7b2cbf'],
['Zn','Zinc', '30', '65.38', '#7b2cbf'],
['Ga','Gallium', '31', '69.723', '#90be6d'],
['Ge','Germanium', '32', '72.63', '#f9c74f'],
['As','Arsenic', '33', '74.92160', '#f9c74f'],
['Se','Selenium', '34', '78.971', '#3a86ff'],
['Br','Bromine', '35', '79.904', '#3a86ff'],
['Kr','Krypton', '36', '83.798', '#ff006e'],
['Rb','Rubidium', '37', '85.4678', '#43aa8b'],
['Sr','Strontium', '38', '87.62', '#f94144'],
['Y','Yttrium', '39', '88.90585', '#7b2cbf'],
['Zr','Zirconium', '40', '91.224', '#7b2cbf'],
['Nb','Niobium', '41', '92.90638', '#7b2cbf'],
['Mo','Molybdenum', '42', '95.96', '#7b2cbf'],
['Tc','Technetium', '43', '(98)', '#7b2cbf'],
['Ru','Ruthenium', '44', '101.07', '#7b2cbf'],
['Rh','Rhodium', '45', '102.90550', '#7b2cbf'],
['Pd','Palladium', '46', '106.42', '#7b2cbf'],
['Ag','Silver', '47', '107.8682', '#7b2cbf'],
['Cd','Cadmium', '48', '112.411', '#7b2cbf'],
['In','Indium', '49', '114.818', '#90be6d'],
['Sn','Tin', '50', '118.710', '#90be6d'],
['Sb','Antimony', '51', '121.760', '#f9c74f'],
['Te','Tellurium', '52', '127.60', '#f9c74f'],
['I','Iodine', '53', '126.90447', '#3a86ff'],
['Xe','Xenon', '54', '131.293', '#ff006e'],
['Cs','Caesium', '55', '132.9054519', '#43aa8b'],
['Ba','Barium', '56', '137.327', '#f94144'],
['La','Lanthanum', '57', '138.90547', '#277DA1'],
['Ce','Cerium', '58', '140.116', '#277DA1'],
['Pr','Praseodymium', '59', '140.90765', '#277DA1'],
['Nd','Neodymium', '60', '144.242', '#277DA1'],
['Pm','Promethium', '61', '(145)', '#277DA1'],
['Sm','Samarium', '62', '150.36', '#277DA1'],
['Eu','Europium', '63', '151.964', '#277DA1'],
['Gd','Gadolinium', '64', '157.25', '#277DA1'],
['Tb','Terbium', '65', '158.92535', '#277DA1'],
['Dy','Dysprosium', '66', '162.500', '#277DA1'],
['Ho','Holmium', '67', '164.93032', '#277DA1'],
['Er','Erbium', '68', '167.259', '#277DA1'],
['Tm','Thulium', '69', '168.93421', '#277DA1'],
['Yb','Ytterbium', '70', '173.054', '#277DA1'],
['Lu','Lutetium', '71', '174.9668', '#277DA1'],
['Hf','Hafnium', '72', '178.49', '#7b2cbf'],
['Ta','Tantalum', '73', '180.94788', '#7b2cbf'],
['W','Tungsten', '74', '183.84', '#7b2cbf'],
['Re','Rhenium', '75', '186.207', '#7b2cbf'],
['Os','Osmium', '76', '190.23', '#7b2cbf'],
['Ir','Iridium', '77', '192.217', '#7b2cbf'],
['Pt','Platinum', '78', '195.084', '#7b2cbf'],
['Au','Gold', '79', '196.966569', '#7b2cbf'],
['Hg','Mercury', '80', '200.59', '#7b2cbf'],
['Tl','Thallium', '81', '204.3833', '#90be6d'],
['Pb','Lead', '82', '207.2', '#90be6d'],
['Bi','Bismuth', '83', '208.98040', '#90be6d'],
['Po','Polonium', '84', '(209)', '#90be6d'],
['At','Astatine', '85', '(210)', '#90be6d'],
['Rn','Radon', '86', '(222)', '#ff006e'],
['Fr','Francium', '87', '(223)', '#43aa8b'],
['Ra','Radium', '88', '(226)', '#f94144'],
['Ac','Actinium', '89', '(227)', '#F3722C'],
['Th','Thorium', '90', '232.03806', '#F3722C'],
['Pa','Protactinium', '91', '231.0588', '#F3722C'],
['U','Uranium', '92', '238.02891', '#F3722C'],
['Np','Neptunium', '93', '(237)', '#F3722C'],
['Pu','Plutonium', '94', '(244)', '#F3722C'],
['Am','Americium', '95', '(243)', '#F3722C'],
['Cm','Curium', '96', '(247)', '#F3722C'],
['Bk','Berkelium', '97', '(247)', '#F3722C'],
['Cf','Californium', '98', '(251)', '#F3722C'],
['Es','Einsteinium', '99', '(252)', '#F3722C'],
['Fm','Fermium', '100', '(257)', '#F3722C'],
['Md','Mendelevium', '101', '(258)', '#F3722C'],
['No','Nobelium', '102', '(259)', '#F3722C'],
['Lr','Lawrencium', '103', '(262)', '#F3722C'],
['Rf','Rutherfordium', '104', '(267)', '#7b2cbf'],
['Db','Dubnium', '105', '(268)', '#7b2cbf'],
['Sg','Seaborgium', '106', '(271)', '#7b2cbf'],
['Bh','Bohrium', '107', '(272)', '#7b2cbf'],
['Hs','Hassium', '108', '(270)', '#7b2cbf'],
['Mt','Meitnerium', '109', '(276)', '#577590'],
['Ds','Darmstadtium', '110', '(281)', '#577590'],
['Rg','Roentgenium', '111', '(280)', '#577590'],
['Cn','Copernicium', '112', '(285)', '#577590'],
['Nh','Nihonium', '113', '(284)', '#577590'],
['Fl','Flerovium', '114', '(289)', '#577590'],
['Mc','Moscovium', '115', '(288)', '#577590'],
['Lv','Livermorium', '116', '(293)', '#577590'],
['Ts','Tennessine', '117', '(294)', '#577590'],
['Og','Oganesson', '118', '(294)', '#577590']
];