Pagina 1 di 5
Nascondere body tag
Inviato: 10/10/2015, 14:59
da frank
Devo nascondere questo dal file overall_header.html
Codice: Seleziona tutto
<body id="phpbb" class="nojs notouch section-{SCRIPT_NAME} {S_CONTENT_DIRECTION} {BODY_CLASS}">
e con l'estensione farlo apparire con l'onload
Codice: Seleziona tutto
<body id="phpbb" class="nojs notouch section-{SCRIPT_NAME} {S_CONTENT_DIRECTION} {BODY_CLASS}" onload="miaFunzione()">
ho messo così, è giusto?
<style>
body {
display: none !important;
}
</style>
<"onload="miaFunzione()">
Re: Nascondere body tag
Inviato: 10/10/2015, 15:19
da brunino
Non puoi nascondere così... Devi usare solo JavaScript, una cosa molto simile a quella che ti aveva indicato Sir nell'altro topic
Inviato dal mio MotoE2(4G-LTE) utilizzando Tapatalk
Re: Nascondere body tag
Inviato: 10/10/2015, 15:33
da Sir Xiradorn
Non si nasconde ma si sovraccarica tramite il .setAttribute() per il js puro o lo .attr() per jquery
Re: Nascondere body tag
Inviato: 10/10/2015, 16:07
da frank
Così?
Codice: Seleziona tutto
<script>
function timeCeck() {
document.getElementById("phpbb").setAttribute("onload="miaFunzione()");
}
</script>
Re: Nascondere body tag
Inviato: 10/10/2015, 19:58
da Sir Xiradorn
Nein. Deve essere qualcosa del tipo
Codice: Seleziona tutto
function timeCeck() {
document.getElementById("phpbb").setAttribute("onload, "miaFunzione()");
}
Re: Nascondere body tag
Inviato: 10/10/2015, 20:04
da frank
Ho corretto, ho creato un file js e l'ho messa dentro, poi la richiamo nel file overall_header_breadcrumb_prepend.html dove ho la funzione, così
Codice: Seleziona tutto
<!-- INCLUDEJS @alberto_checkperm/js/timeCheck.js -->
Re: Nascondere body tag
Inviato: 10/10/2015, 22:05
da frank
Ho creato anche un file
overall_header_head_append e l'ho messo dentro, ma non va
Codice: Seleziona tutto
<script>
function timeCeck() {
document.getElementById("phpbb").setAttribute("onload", "miaFunzione()");
}
</script>
Re: Nascondere body tag
Inviato: 10/10/2015, 22:20
da Sir Xiradorn
Devi metterlo alla fine!!!!!!!!!!
Re: Nascondere body tag
Inviato: 10/10/2015, 22:26
da frank
Non va
Codice: Seleziona tutto
<script>
'use strict'
var elementoCheScompare1, elementoCheScompare2, elementoCheScompare3;
elementoCheScompare1 = document.getElementById('restorePerm');
elementoCheScompare2 = document.getElementById('restorePermX');
elementoCheScompare3 = document.getElementById('restorePermXX');
function miaFunzione() {
var elem1, elem2, elem3;
elem1 = document.getElementById('restorePerm');
elem2 = document.getElementById('restorePermX');
elem3 = document.getElementById('restorePermXX');
// togli visibilità
elem1.style.visibility = "hidden";
elem2.style.visibility = "hidden";
elem3.style.visibility = "hidden";
// dopo tot dai visibilità
setTimeout(function() {
elem1.style.visibility = "visible";
elem2.style.visibility = "visible";
elem3.style.visibility = "visible";
}, 3000);
}
function timeCeck() {
document.getElementById("phpbb").setAttribute("onload", "miaFunzione()");
}
</script>
Re: Nascondere body tag
Inviato: 10/10/2015, 22:47
da Sir Xiradorn
Lo script non va nel header ma va nel footer dove ci stanno tutti gli script