07-19-2023, 04:07 PM
I'm currently working with the gpEasy CMS and I would need to reproduce the hide/show effect that is on this website:
I went to the code source and added the function showAbstract that was already here:
<!-- language: lang-js -->
function showAbstract(e){
f = e;
var div;
for(div = e.nextSibling; div.className != "abs"; div = div.nextSibling);
if (div.style.display=="block"){
div.style.display="";
} else {
div.style.display="block";
}
return true;
}
So I added it to my code and used the class="abs" to call it :
<!-- language: lang-html -->
<a href="javascript:void(0)" onclick="showAbstract(this)">Matrix completion ...</a>
<div class="abs"> Recent ubiquity ... </div>
Unfortunately, I just have the text displaying but not the effect expected. Would you have any idea ?
Thanks!
[To see links please register here]
(links in the program).I went to the code source and added the function showAbstract that was already here:
<!-- language: lang-js -->
function showAbstract(e){
f = e;
var div;
for(div = e.nextSibling; div.className != "abs"; div = div.nextSibling);
if (div.style.display=="block"){
div.style.display="";
} else {
div.style.display="block";
}
return true;
}
So I added it to my code and used the class="abs" to call it :
<!-- language: lang-html -->
<a href="javascript:void(0)" onclick="showAbstract(this)">Matrix completion ...</a>
<div class="abs"> Recent ubiquity ... </div>
Unfortunately, I just have the text displaying but not the effect expected. Would you have any idea ?
Thanks!