Reputation: 28359
I have a button div that I've attached a jQuery animation to, that exposes/hides it upon some other event.
It works nicely, but I'm unclear on what style elements of the div they are altering, so, I'm not sure how to set up its CSS so that it starts out hidden and then becomes exposed when the event that starts the animation is kicked off.
Upvotes: 2
Views: 906
Reputation: 731
use display: none;
thats what jquery sets it to once it has been 'hidden'
Upvotes: 1
Reputation: 1034
You've got a couple options:
With css
display: none;
Or jQuery
.hide()
Upvotes: 2
Reputation: 6258
As I understand it, you are wondering what properties to put on in the base page code. In that case, just put a simple display:none;
on the button element - jQuery is smart enough to take care of the rest.
Upvotes: 3