onmoveend event

Fires when the object stops moving.

Syntax

HTML Attribute <element onmoveend = "handler(event)">
Event Property object.onmoveend = handler;

Event information

SynchronousNo
BubblesNo
CancelableNo

Event handler parameters

pEvtObj [in]

Type: IHTMLEventObj

Standards information

There are no standards that apply here.

Remarks

The onmoveend event fires only when an editable element stops moving.

This event can only be bound to absolutely positioned elements.

Calls the associated event handler if there is one.

To invoke this event, do one of the following:

  • Stop moving the editable object.

Examples

The following example shows how to use the onmoveend event with a movable DIV and have the background color and inner text change when the mouse button is released and the DIV stops moving.



<HTML>
<HEAD>
<TITLE>Editing events sample page</TITLE>
<SCRIPT>
// Turn on 2D positioning
document.execCommand("2D-position",false,true);
// Fires when the onmovestart event is fired
function fnHandleMoveStart() {
  var oDiv = event.srcElement
  oDiv.style.backgroundColor = "green";
  oDiv.innerText = "I Started Moving";
}
// Function called when the onmoveend event is fired
function fnHandleMoveEnd() {
  var oDiv = event.srcElement
  oDiv.style.backgroundColor = "red";
  oDiv.innerText = "I Stopped";
}
</SCRIPT>
</HEAD>
<BODY onmovestart="fnHandleMoveStart();" onmoveend="fnHandleMoveEnd();">
<DIV CONTENTEDITABLE="true">
<DIV style="width:300px;height:100px; color:white; background-color:red; 
position:absolute;">
My DIV</DIV>
</DIV>
</BODY>
</HTML>


See also

a
abbr
address
area
b
bdo
blockQuote
body
button
caption
cite
custom
dd
div
dl
dt
em
embed
fieldSet
form
hn
hr
i
iframe
img
input type=button
input type=checkbox
input type=file
input type=hidden
input type=image
input type=password
input type=radio
input type=reset
input type=submit
input type=text
ins
kbd
label
legend
li
object
ol
p
pre
q
rt
ruby
s
samp
select
small
span
strong
sub
sup
table
tBody
td
textArea
tFoot
th
tHead
tr
u
ul
var

 

 

Send comments about this topic to Microsoft

Build date: 11/14/2012

Show:
© 2014 Microsoft