jQuery simulate extended
The simulate extended plugin provides methods for simulating complex user interactions based on the jQuery.simulate.js plugin from jQuery UI.
The plugin provides simulation of:
Additionally, the extended plugin includes documentation and fixes for the jQuery simulate plugin itself.
To use the jQuery simulate extended plugins, include jquery.simulate.js
, jquery.simulate.ext.js
and then the desired plugins (in that order).
The simulations are executed by calling the .simulate()
function on a jQuery object. The simulation
is then executed on all elements in the collection of the jQuery object (unless otherwise noted).
.simulate(type, options)
The types of simulated actions are:
"mousemove"
, "mousedown"
, "mouseup"
, "click"
, dblclick"
,
"mouseover"
, "mouseout"
, "mouseenter"
, "mouseleave"
, "contextmenu"
"keydown"
, "keyup"
, "keypress"
"focus"
"blur"
"drag-n-drop"
, "drag"
, "drop"
"key-sequence"
"key-combo"
$('#myInput').simulate("key-sequence", {sequence: "asdf"});
The demos folder contains a demonstration of most of the features of the simulate extended plugins.
Live demos can be found at jsFiddle and JS Bin where you can also play around with the plugin:
The options and events for the different interactions are described in the files in the doc folder:
The plugin requires
The plugins have been successfully tested with jQuery 1.7.2 and jQuery Simulate @485ca7192a. However, they should be compatible with future versions.
Copyright © 2012 Jochen Ulrich
https://github.com/j-ulrich/jquery-simulate-ext
Licensed under the MIT license.