Editing Behaviors Edit the Parameters for a Behavior Open the Web page with the behavior you want to change.. Select an element on the Web page that contains an attached behavior, or if
Trang 1356 Chapter 15
After you create a behavior, you can quickly and easily change the parameters for the action or the event that triggers the action When you complete your changes to a behavior, all occurrences of the behavior on the page are updated If other pages use the same behav-ior, you need to update the behavior on each page
Editing Behaviors
Edit the Parameters for a
Behavior
Open the Web page with the
behavior you want to change
Click the Window menu, and then
click Behaviors to display the
Behaviors panel
Select an element on the Web
page that contains an attached
behavior, or if the behavior is
attached to the document, click
the <body> tag in the tag selector
at the bottom left of the Document
window
The behaviors attached to the
element appear in the Behaviors
panel
Select the specific event for the
action that you want to edit
Click the Behaviors Options
button, and then click Edit
Behavior.
TIMESAVER Double-click the
event to open the dialog box; you
can also select it, and then press
Enter (Win) or Return (Mac)
In a behaviors dialog box, make
the changes you want; the dialog
box options differ depending on
the behavior
Click OK.
7
6
5
4
3
2
1
3
7 6
From the Library of Wow! eBook
Trang 2Change the Event for a Behavior
Open the Web page with the
behavior you want to change
Click the Window menu, and then
click Behaviors to display the
Behaviors panel
Select an element on the Web
page that contains an attached
behavior, or if the behavior is
attached to the document, click the
<body> tag in the tag selector at
the bottom left of the Document
window
The behaviors attached to the
element appear in the Behaviors
panel
Click the specific event that you
want to edit
Click the Event list arrow, and then
select the event you want to trigger
the action from the available
options
5
4
3
2
1
3
Trang 3358 Chapter 15
Behaviors you have attached to a selected page element appear in the Behaviors panel in the behaviors list by event in alphabetical order If you have multiple actions for a specific event, the behaviors are exe-cuted by the browser in the order in which they appear in the behavior list You can use the Behaviors panel to change the order If you no longer need a behavior, you can remove it from the list
Working with
Behaviors
Change Multiple Behavior Order
Open the Web page with the
behavior you want to change
Click the Window menu, and then
click Behaviors to display the
Behaviors panel
Select an element on the page that
contains multiple behaviors
The behaviors attached to the
element appear in the Behaviors
panel
Select the behavior action you
want to change
Click the Up or Down buttons to
move the action to a different
stacking order
TIMESAVER Press the Up and
Down arrow keys to move the
selected action
5
4
3
2
5
4
From the Library of Wow! eBook
Trang 4Remove a Behavior
Open the Web page with the
behavior you want to remove
Click the Window menu, and then
click Behaviors to display the
Behaviors panel
Select an element on the Web
page that contains an attached
behavior, or if the behavior is
attached to the document, click the
<body> tag in the tag selector at
the bottom left of the Document
window
The behaviors attached to the
element appear in the Behaviors
panel
Select the behavior action you
want to delete
Click the Remove Event button
(minus sign)
The behavior is removed from the
document
5
4
3
2
5
4
Trang 5360 Chapter 15
Dreamweaver Effects give you one more way to create dynamic Web pages For example, you can use Behavior Effects to make a Web ele-ment shrink to half size, or to slowly fade away, there's even an event that lets you make objects shake While these options are fun to use, remember that Web design is not about what you can do to a site to make it dynamic You have to ask yourself this question: Are the special effects that I'm using helping me to keep my visitor's attention, and are they in line with the message that I'm trying to send? If the answer to those questions is “yes,” then by all means, use effects; however, if the answer is “no,” then stay away from using the effects
Adding Behavior
Effects
Adding Effects
Open the Web page you want to
apply a behavior effect to an
element
Click the Window menu, and then
click Behaviors to display the
Behaviors panel
Select an element on the page to
which you want to attach an
effect
Click the Add Behavior button
(plus sign), point to Effects, and
then select an effect from the
following options:
◆ Appear/Fade Use this effect
when you want the element to
slowly appear or fade from the
Web page
◆ Blind Use this effect when you
want the element to slowly rise
or lower on the page (like
opening or closing a blind)
◆ Grow/Shrink Use this effect
when you want the element to
increase or decrease in size
◆ Highlight Use this effect when
you want the element (typically
text) to change color
◆ Shake Use this effect when
you want the element to shake
side to side
4
3
2
1
3
4
From the Library of Wow! eBook
Trang 6◆ Slide Use this effect when you
want the element to slide
Works by selecting the
container tag of the content tag
that you want to slide
◆ Squish Use this effect when
you want the element to slowly
reduce in size until gone (the
anchor point for the squish
effect is the upper-left corner
of the Web object)
Specify the options you want in
the dialog box for the specific
effect; the options vary depending
on the effect
IMPORTANT Not all the
behavior effects work for all the
elements in Dreamweaver; an
error message may appear
Click OK to attach the effect to the
Page, Document, or Tag
6
5
6
5
Behavior effects