Technical Details
Forum version : #phpBB3
Position : Founder
Concerned browser(s) : Google Chrome
Who the problem concerns : All members
When the problem appeared : In a HTML page
Forum link : ( link is hidden, you must reply to see )
Description of problem
I have a problem with my forum's JavaScript. When I refresh the page the forum takes one or two seconds charging the code.I mean, for example, I have this code:
- Code:
$(function(){
if(_userdata["session_logged_in"] == 0){
$('#natthome:contains(Home)').remove();
}
else {
$('div#menuWrapper li:contains(Registrarse)').remove();
}
});
This code removes a word from the navbar for the connected members. Only no-register members can see that word. But... when I am log in and i refresh the forum I see that word, one second, and then the JavaScript works and remove it.
I would like to know if there is any way of optimizing my JavaScript to avoid that annoying second.
¡Thanks!