Web fix the style values first (visible should be visibility, and diaplay should be display).
Set style visibility jquery. Web you can use the css function to get the style of the element, and the filter function to select them from a collection of elements: Web if we wanted to use jquery to set the visibility of the paragraph inside of div #div1 to hidden, we would use the following javascript code: Hide() will not change the style if already hidden.
So doing the latter won't rectify the former. I just checked the jquery 1.7 source code and verified that is the case. Web hide docs in jquery.
The first will overwrite any existing style settings. Based on the comment below, you are removing all style with removeattr(style), in which case call hide() immediately after that. Change them to class instead and select them using $(.myspan).
Web behind the scene jquery's hide and show just set display: The reverse of this is of course. So,.css ('display', 'none') would be matched with.show ().
40 jquery's.show () and.hide () only operate on the css display property, not on the visibility property. The resulting html would be as follows: Where the element1 on hover will change visibility of element2.
This will use the normal cool animation to hide the div, but after the animation finish you set the visibility to hidden and display to block. So keep your original jquery and add this to css: Also, id s should only be used once.