aboutsummaryrefslogtreecommitdiffstats
path: root/test/testabilityPatch.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/testabilityPatch.js')
-rw-r--r--test/testabilityPatch.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/testabilityPatch.js b/test/testabilityPatch.js
index e5eef63e..b05770c7 100644
--- a/test/testabilityPatch.js
+++ b/test/testabilityPatch.js
@@ -148,3 +148,12 @@ function assertThrows(error, fn){
log = noop;
error = noop;
+
+function click(element) {
+ element = jqLite(element);
+ if ( (msie || jqLite == window.jQuery) &&
+ nodeName(element) == 'INPUT' && (lowercase(element.attr('type')) == 'radio' || lowercase(element.attr('type')) == 'checkbox')) {
+ element[0].checked = ! element[0].checked;
+ }
+ element.trigger('click');
+}