Spaces:
Running
Running
cleaned the code
Browse files- ai_models.html +7 -7
ai_models.html
CHANGED
@@ -96,7 +96,7 @@
|
|
96 |
//displays the button if the user scrolls 50px at least
|
97 |
function scrollFunction() {
|
98 |
if (document.body.scrollTop > 50 || document.documentElement.scrollTop > 50) { mybutton.style.display = "block";}
|
99 |
-
else { mybutton.style.display =
|
100 |
}
|
101 |
|
102 |
//reset users position on the page
|
@@ -106,7 +106,7 @@
|
|
106 |
}
|
107 |
|
108 |
function AI_ModelTableCreate(dataSection,id) {
|
109 |
-
tbl = document.getElementById(id.concat(
|
110 |
|
111 |
// equalizes both table's length
|
112 |
N_row = Math.max(dataModel.seg.length,dataModel.dose.length);
|
@@ -117,7 +117,7 @@
|
|
117 |
// creates a filled row
|
118 |
if (i < dataSection.length) {
|
119 |
// data-href contains the id of the model which is linked to it (eg: data-href="#x" will transfer the user to the component with id="x")
|
120 |
-
tr.setAttribute(
|
121 |
tr.setAttribute('data-href','#'.concat(id.concat(i.toString())))
|
122 |
|
123 |
for (let j = 0; j < 2; j++) {
|
@@ -138,7 +138,7 @@
|
|
138 |
}
|
139 |
|
140 |
function AI_ModelCardsCreate(dataSection,id) {
|
141 |
-
renderSection = document.getElementById(id.concat(
|
142 |
|
143 |
// defines et sets attribute for each divs containing the modelcard
|
144 |
for (let i = 0; i < dataSection.length; i++) {
|
@@ -176,11 +176,11 @@
|
|
176 |
}
|
177 |
|
178 |
// triggers
|
179 |
-
let mybutton = document.getElementById(
|
180 |
window.onscroll = function() {scrollFunction()};
|
181 |
|
182 |
-
$(
|
183 |
-
window.location = $(this).data(
|
184 |
});
|
185 |
</script>
|
186 |
</body>
|
|
|
96 |
//displays the button if the user scrolls 50px at least
|
97 |
function scrollFunction() {
|
98 |
if (document.body.scrollTop > 50 || document.documentElement.scrollTop > 50) { mybutton.style.display = "block";}
|
99 |
+
else { mybutton.style.display = 'none';}
|
100 |
}
|
101 |
|
102 |
//reset users position on the page
|
|
|
106 |
}
|
107 |
|
108 |
function AI_ModelTableCreate(dataSection,id) {
|
109 |
+
tbl = document.getElementById(id.concat('Table'));
|
110 |
|
111 |
// equalizes both table's length
|
112 |
N_row = Math.max(dataModel.seg.length,dataModel.dose.length);
|
|
|
117 |
// creates a filled row
|
118 |
if (i < dataSection.length) {
|
119 |
// data-href contains the id of the model which is linked to it (eg: data-href="#x" will transfer the user to the component with id="x")
|
120 |
+
tr.setAttribute('class', 'clickable');
|
121 |
tr.setAttribute('data-href','#'.concat(id.concat(i.toString())))
|
122 |
|
123 |
for (let j = 0; j < 2; j++) {
|
|
|
138 |
}
|
139 |
|
140 |
function AI_ModelCardsCreate(dataSection,id) {
|
141 |
+
renderSection = document.getElementById(id.concat('Cards'));
|
142 |
|
143 |
// defines et sets attribute for each divs containing the modelcard
|
144 |
for (let i = 0; i < dataSection.length; i++) {
|
|
|
176 |
}
|
177 |
|
178 |
// triggers
|
179 |
+
let mybutton = document.getElementById('topBtn');
|
180 |
window.onscroll = function() {scrollFunction()};
|
181 |
|
182 |
+
$('.clickable').click(function(){
|
183 |
+
window.location = $(this).data('href');
|
184 |
});
|
185 |
</script>
|
186 |
</body>
|