-
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathjs.js
More file actions
44 lines (41 loc) · 1.4 KB
/
js.js
File metadata and controls
44 lines (41 loc) · 1.4 KB
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
// const value = value for database
const card = document.getElementById("Jobcard");
function addjob(){
let li = document.createElement("li")
li.innerHTML = value.value;
card.appendChild(li);
}
$document.ready(function(){
Load_data()
function Load_data(){
$.ajax({
url:"https://localhost:3000/index/action",
method:"POST",
data:{action:'fetch'},
dataType:"json",
success:function(data){
if(data.data.length>0){
for(var count=0; count<data.data.length; count++){
html += `
<div class="itemcard">
<div class="itemimg">
img
</div>
<div class="job">
<h1 class="title">
`+data.data[count].title+`
</h1>
<p class="jobdesc">
`+data.data[count].description+`
</p>
</div>
<a href="<%= data.link %>"><button type="submit">Apply</button></a>
</div>
`;
}
}
$('#index tbody').html
}
})
}
})