All Projects → j-ulrich → Jquery Simulate Ext

j-ulrich / Jquery Simulate Ext

Licence: other
jQuery simulate extended

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Jquery Simulate Ext

Tgcameraviewcontroller
Custom camera with AVFoundation. Beautiful, light and easy to integrate with iOS projects.
Stars: ✭ 1,432 (+894.44%)
Mutual labels:  deprecated
Python Firebase
⛔️ [DEPRECATED] python wrapper for Firebase's REST API
Stars: ✭ 117 (-18.75%)
Mutual labels:  deprecated
Cmsplugin Filer
DEPRECATED, this project is no longer maintained, see README for more information.
Stars: ✭ 129 (-10.42%)
Mutual labels:  deprecated
Python Api Client
[discontinued] Python interfaces to the Meetup Web API
Stars: ✭ 111 (-22.92%)
Mutual labels:  deprecated
Mate
Deprecated: Mate manages AWS Route53 and Google CloudDNS records for your Kubernetes services and ingresses. (moved from https://github.com/zalando-incubator/mate)
Stars: ✭ 114 (-20.83%)
Mutual labels:  deprecated
Intern Only Dojo
DEPRECATED - See dojo/meta for the latest on Dojo 2
Stars: ✭ 123 (-14.58%)
Mutual labels:  deprecated
Govuk template
❗️GOV.UK Template is deprecated, and will only receive major bug fixes and security patches. A template containing the GOV.UK header and footer, and associated assets.
Stars: ✭ 107 (-25.69%)
Mutual labels:  deprecated
Httpserver.jl
DEPRECATED! Basic, non-blocking HTTP server in Julia.
Stars: ✭ 138 (-4.17%)
Mutual labels:  deprecated
Codeigniter Base Controller
⛔️DEPRECATED CodeIgniter base controller with view autoloading and layout support
Stars: ✭ 115 (-20.14%)
Mutual labels:  deprecated
Bselect
DEPRECATED - The select decorator component that was missing for Twitter Bootstrap.
Stars: ✭ 129 (-10.42%)
Mutual labels:  deprecated
Keywhiz Fs
A DEPRECATED file-system client for Keywhiz
Stars: ✭ 112 (-22.22%)
Mutual labels:  deprecated
Atom Esformatter
Beautify JavaScript
Stars: ✭ 113 (-21.53%)
Mutual labels:  deprecated
Ticons Server Php
⛔️ REPLACED BY NODE.JS VERSION:
Stars: ✭ 127 (-11.81%)
Mutual labels:  deprecated
Minify
DEPRECATED A simple plugin that allows you to minify blocks of HTML, CSS, and JS inline in Craft CMS templates
Stars: ✭ 111 (-22.92%)
Mutual labels:  deprecated
Nexpose Client
DEPRECATED: Rapid7 Nexpose API client library written in Ruby
Stars: ✭ 134 (-6.94%)
Mutual labels:  deprecated
Multiline
Multiline strings in JavaScript
Stars: ✭ 1,432 (+894.44%)
Mutual labels:  deprecated
Go Web3
Ethereum Go Client [obsolete]
Stars: ✭ 120 (-16.67%)
Mutual labels:  deprecated
Vip Scanner
Deprecated: Scan all sorts of themes and files and things! Use PHPCS and the VIP coding standards instead
Stars: ✭ 143 (-0.69%)
Mutual labels:  deprecated
Gh
(DEPRECATED) GitHub CLI made with NodeJS
Stars: ✭ 1,701 (+1081.25%)
Mutual labels:  deprecated
React Panels
React.js panel widget with support for tabs, toolbars, buttons and customizable themes
Stars: ✭ 128 (-11.11%)
Mutual labels:  deprecated

Project Status: Abandoned
NOTE: jQuery Simulate Extended is not actively developed anymore. It may still work but chances are high that some features are broken in recent browsers. For more information, see issue #39.

jQuery Simulate Extended Plugin 1.3.0

The jQuery Simulate Extended plugin (a.k.a. jquery-simulate-ext) provides methods for simulating complex user interactions based on the jQuery.simulate() plugin. The plugin provides simulation of:

  • Drag & Drop
  • Key Sequences
  • Key Combinations

Additionally, the extended plugin includes documentation and fixes for the jQuery simulate plugin itself.

Table of Contents

Usage

To use the jquery-simulate-ext plugin, you need to include (in the given order):

  1. bililiteRange.js [if you want to use jquery.simulate.key-sequence.js or jquery.simulate.key-combo.js]
  2. jquery-x.y.z.js
  3. jquery.simulate.js
  4. jquery.simulate.ext.js
  5. jquery.simulate.drag-n-drop.js [if you want to simulate drag & drop]
  6. jquery.simulate.key-sequence.js [if you want to simulate key sequences]
  7. jquery.simulate.key-combo.js [if you want to simulate key combos]

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).

  • Synopsis: .simulate(type, options)
  • Parameters:
    • type {String}: The type of the interaction to be simulated.
    • options {Object}: An option object containing the options for the action to be simulated.

The types of simulated actions are:

  • From the jquery-simulate plugin:
    • Mouse Events: "mousemove", "mousedown", "mouseup", "click", dblclick", "mouseover", "mouseout", "mouseenter", "mouseleave", "contextmenu"
    • Key Events: "keydown", "keyup", "keypress"
    • "focus"
    • "blur"
  • From the jquery-simulate-ext plugin:
    • Drag & Drop: "drag-n-drop", "drag", "drop"
    • "key-sequence"
    • "key-combo"

Example:

$('input[name="testInput"]').simulate("key-sequence", {sequence: "asdf"});

Demos:

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:

Documentation

The options and events for the different interactions are described in the files in the doc folder:

Global Options:

Options recognized by all jquery-simulate-ext plugins:

  • eventProps {Object}: Defines custom properties which will be attached to the simulated events.
    Note: Trying to define default properties of events (e.g. type, bubbles, altKey, etc.) using this option might not work since those properties are typically read-only.
    Note: The dispatchEvent() function of all major browsers will remove custom properties from the event. Therefore, the jquery.simulate.js from the jquery-simulate-ext repository contains an option to use jQuery.trigger() instead of the native dispatchEvent(). This causes that the simulated event will only trigger event handlers attached using the same jQuery instance and not handlers attached using addEventListener() or using another versions of jQuery (see http://bugs.jquery.com/ticket/11047 for more information), but it's the only way to allow the custom properties to be used in the event handlers. To activate this option, define jQueryTrigger: true in the eventProps option object. For example:

     $('#mySimulateTarget').simulate('key-sequence', {
     	sequence: "my simulated text",
     	eventProps: {
     		jQueryTrigger: true,
     		simulatedEvent: true
     	}
     });
    

    Tip: As the example shows, this allows to flag the simulated events, which allows to distinguish the simulated events from real events in the event handlers. See issue #12 for more information.

Requirements

The plugin requires

Compatibility

The plugins have been successfully tested with jQuery 1.7.2, 1.10.2, 2.1.0 and jQuery Simulate @485ca7192a, @25938de206. However, they should be compatible with other/future versions as well.

Quirk Detection

There are some issues with bililiteRange and some browsers. To workaround these issues, jquery-simulate-ext performs some quirk detections when the document is ready. Those quirk detections also contain temporary DOM manipulations. If you don't want those DOM manipulations to take place, you can disable the quirk detection by setting the flag ext_disableQuirkDetection in the jQuery.simulate object after jquery.simulate.js has been loaded but before any jquery-simulate-ext plugin is loaded. For example:

<!-- ... -->
<script type="text/javascript" src="../libs/jquery.simulate.js"></script>
<script type="text/javascript">$.simulate.ext_disableQuirkDetection = true;</script>
<script type="text/javascript" src="../src/jquery.simulate.ext.js"></script>
<script type="text/javascript" src="../src/jquery.simulate.key-sequence.js"></script>
<!-- ... -->

For more information, see issue #9.

Licensing

Copyright © 2014 Jochen Ulrich https://github.com/j-ulrich/jquery-simulate-ext

Licensed under the MIT license.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].