Reputation: 1344
I am using jQuery tabs control on www.quickerbook.imobisoft.eu . On top right corner, under “My Account” you can see tabs appear for some time and hide until the page loads completely. I tried so many Posts/Forums to fix the issue but because of beginner level in jQuery I am unable to fix the issue.
Please guide how can I hide the tabs? It should appear when user clicks on “My Account” tab.
Upvotes: 0
Views: 308
Reputation: 1228
The 'flash of unstyled content' is because the page displays before the javascript has javascript runs in the page.
I like to go for the modernizr approach of adding a classname to the root html element, then using css to hide elements based on js being enabled.
So, in your <head>
<script>document.getElementsByTagName("html")[0].className = 'js'</script>
Then add this style to hide the tab:
.js #hidden1{display:none}
Upvotes: 1
Reputation: 17920
On page Source at Line: 63
(chrome browser). You are hiding the tab after page loads using .hide()
,
$('#hidden1,#hidden2,#hidden3').hide().click(function(e) {
e.stopPropagation(); ^^^^
});
Change it to,
$('#hidden1,#hidden2,#hidden3').click(function(e) {
e.stopPropagation();
});
Upvotes: 0