Delete text-expand.html (not a necessary include)
This commit is contained in:
parent
9c90bbf980
commit
ceb1cd7f73
1 changed files with 0 additions and 16 deletions
|
@ -1,16 +0,0 @@
|
||||||
<script>
|
|
||||||
|
|
||||||
var elements = document.querySelectorAll('p');
|
|
||||||
Array.prototype.forEach.call(elements, function(el, i){
|
|
||||||
if(el.innerHTML=='[expand]') {
|
|
||||||
var parentcontent = el.parentNode.innerHTML.replace('<p>[expand]</p>','<div class="expand" style="display: none; height: 0; overflow: hidden;">').replace('<p>[/expand]</p>','</div>');
|
|
||||||
el.parentNode.innerHTML = parentcontent;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
var elements = document.querySelectorAll('div.expand');
|
|
||||||
Array.prototype.forEach.call(elements, function(el, i){
|
|
||||||
el.previousElementSibling.innerHTML = el.previousElementSibling.innerHTML + '<span>.. <a href="#" style="cursor: pointer;" onclick="this.parentNode.parentNode.nextElementSibling.style.display = \'block\'; this.parentNode.parentNode.nextElementSibling.style.height = \'auto\'; this.parentNode.style.display = \'none\';">read more →</a></span>';
|
|
||||||
});
|
|
||||||
|
|
||||||
</script>
|
|
Loading…
Reference in a new issue