Now I have an onready event handler:
$(function() {
$('element').hide();
});
but element is hiding only after it appears in browser, and it disappear like a flash.
Can I bind any hide() function before content appears in my browser?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
No. The DOM must be loaded first before being able to manipulate it with javascript. The best way is to simply hide the element using CSS from the server side so that it never shows when the page loads. So define a hidden class in your CSS file:
and then apply it to your element: