-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathour_jobs_page_script.js
56 lines (33 loc) · 1.95 KB
/
our_jobs_page_script.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
var job_positions_list = JSON.parse(localStorage.getItem("job_positions_list"));
var home_btn = document.getElementById("home_btn");
home_btn.addEventListener("click", OnHomeBtnClicked);
InitJobPositionDivs();
function InitJobPositionDivs()
{
for (let current_index = 0; current_index < job_positions_list.length; current_index++)
{
var new_job_position_div = document.createElement("div");
new_job_position_div.className = "job_position_div_class";
var new_job_position_details_div = document.createElement("div");
new_job_position_details_div.className = "job_position_details_div_class";
var new_job_position_img = document.createElement("img");
new_job_position_img.setAttribute("src", job_positions_list[current_index].job_pos_img_link);
new_job_position_img.className = "job_position_img_class";
var new_job_position_name_tag = document.createElement("h3");
new_job_position_name_tag.innerHTML = job_positions_list[current_index].job_pos_name;
var new_job_position_description_tag = document.createElement("p");
new_job_position_description_tag.innerHTML = "Job Description: " + job_positions_list[current_index].job_pos_description;
var new_job_position_requirements_tag = document.createElement("p");
new_job_position_requirements_tag.innerHTML = "Job Requirements: " + job_positions_list[current_index].job_pos_requirements;
new_job_position_details_div.appendChild(new_job_position_name_tag);
new_job_position_details_div.appendChild(new_job_position_description_tag);
new_job_position_details_div.appendChild(new_job_position_requirements_tag);
new_job_position_div.appendChild(new_job_position_img);
new_job_position_div.appendChild(new_job_position_details_div);
document.body.appendChild(new_job_position_div);
}
}
function OnHomeBtnClicked()
{
window.location.href = "index.html";
}