beautypg.com

Apply the show-hide elements behavior, Apply the show pop-up menu behavior, Add, remove, and rearrange pop-up menu items – Adobe Dreamweaver CC 2015 User Manual

Page 430: Format a pop-up menu, Position a pop-up menu in a document, Modify a pop-up menu, Apply the swap image behavior

background image

423

Javascript

Last updated 6/3/2015

Apply the Show-Hide Elements behavior

The Show-Hide Elements behavior shows, hides, or restores the default visibility of one or more page elements. This
behavior is useful for displaying information as the user interacts with the page. For example, as the user moves the
pointer over an image of a plant, you could show a page element giving details about the plant’s growing season and
region, how much sun it needs, how large it can grow, and so on. The behavior only shows or hides the pertinent
element—it does not actually remove the element from the flow of the page when it is hidden.

1

Select an object and select Show-Hide Elements from the Add Behavior menu of the Behaviors panel.

If Show-Hide Elements is unavailable, you probably have an AP element selected. Because AP elements do not
accept events in both 4.0 browsers, you must select a different object—such as the tag or a link () tag.

2

From the Elements list, select the element you want to show or hide and click Show, Hide, or Restore (which restores
the default visibility).

3

Repeat step 2 for all remaining elements whose visibility you want to change. (You can change the visibility of
multiple elements with a single behavior.)

4

Click OK and verify that the default event is correct.

Apply the Show Pop-Up Menu behavior

This behavior has been deprecated as of Dreamweaver CS5.

Add, remove, and rearrange pop-up menu items

This behavior has been deprecated as of Dreamweaver CS5.

Format a pop-up menu

This behavior has been deprecated as of Dreamweaver CS5.

Position a pop-up menu in a document

This behavior has been deprecated as of Dreamweaver CS5.

Modify a pop-up menu

This behavior has been deprecated as of Dreamweaver CS5.

Apply the Swap Image behavior

The Swap Image behavior swaps one image for another by changing the src attribute of the tag. Use this behavior
to create button rollovers and other image effects (including swapping more than one image at a time). Inserting a
rollover image automatically adds a Swap Image behavior to your page.

Note: Because only the src attribute is affected by this behavior, you should swap in an image that has the same dimensions
(height and width) as the original. Otherwise, the image you swap in shrinks or expands to fit the dimensions of the original
image.