#177 new
Tinel Barb

Complete show() and hide() functions

Reported by Tinel Barb | March 23rd, 2011 @ 11:52 AM

I have observed that the E.hide() and E.show() function works only with "display:.." CSS property.
Well, I often use the "visibility:..." CSS property because it doesn't change the layout of the webpage when hidding/showing html objects.
To get benefit of the "visibility" CSS property a way is to colplete the E.show() and E.hide() functions with a parameter so the programmer can choose the property (like E.show() or E.show(1) - works with "display:" and E.show(2) - works with "visibility:") or creating different functions that use "visibility".
I prefer the first variant, to complete the show() and hide() functions with parameters.

/ CSS Reference by http://www.w3schools.com/Css/pr_class_visibility.asp / visibility: visible; / The element is visible. This is default /
visibility: hidden, / The element is invisible (but still takes up space) /

/ other values: / visibility: collapse / Only for table elements. collapse removes a row or column, /

                  /* but it does not affect the table layout. The space taken up   */
                  /* by the row or column will be available for other content.     */
                  /* If collapse is used on other elements, it renders as "hidden" */

visibility: inherit / Specifies that the value of the visibility property should be /

                  /* inherited from the parent element                             */

Tinel Barb

No comments found

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

Shared Ticket Bins

People watching this ticket