diff options
| author | Misko Hevery | 2010-04-22 17:11:56 -0700 |
|---|---|---|
| committer | Misko Hevery | 2010-04-22 17:11:56 -0700 |
| commit | fe434307d15d697a5ffade51bad068f6443965b2 (patch) | |
| tree | 64ca5ea2afee38d79ac973ffad4bf6902d6449a6 /test/testabilityPatch.js | |
| parent | 2a9669e1d853d4e18d2eb1f07e84ee5baec838c2 (diff) | |
| download | angular.js-fe434307d15d697a5ffade51bad068f6443965b2.tar.bz2 | |
tests work under jquery and without
Diffstat (limited to 'test/testabilityPatch.js')
| -rw-r--r-- | test/testabilityPatch.js | 9 |
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'); +} |
