diff --git a/jquery/jquery-1.8.d.ts b/jquery/jquery-1.8.d.ts
index 99d393804..fd2044984 100644
--- a/jquery/jquery-1.8.d.ts
+++ b/jquery/jquery-1.8.d.ts
@@ -514,6 +514,9 @@ interface JQuery {
mouseevent(eventData: any, handler: (eventObject: JQueryEventObject) => any): JQuery;
mouseevent(handler: (eventObject: JQueryEventObject) => any): JQuery;
+ mouseenter(eventData: any, handler: (eventObject: JQueryEventObject) => any): JQuery;
+ mouseenter(handler: (eventObject: JQueryEventObject) => any): JQuery;
+
mouseleave(eventData: any, handler: (eventObject: JQueryEventObject) => any): JQuery;
mouseleave(handler: (eventObject: JQueryEventObject) => any): JQuery;
@@ -610,7 +613,7 @@ interface JQuery {
replaceWith(func: any): JQuery;
text(): string;
- text(textString: string): JQuery;
+ text(textString: any): JQuery;
text(textString: (index: number, text: string) => string): JQuery;
toArray(): any[];
diff --git a/jquery/jquery-tests.ts b/jquery/jquery-tests.ts
index e7af57f06..e5286cfd6 100644
--- a/jquery/jquery-tests.ts
+++ b/jquery/jquery-tests.ts
@@ -1119,6 +1119,24 @@ function test_each() {
});
}
+function test_mouseEvents() {
+ var i = 0;
+ $("div.overout").mouseover(function () {
+ $("p:first", this).text("mouse over");
+ $("p:last", this).text(++i);
+ }).mouseout(function () {
+ $("p:first", this).text("mouse out");
+ });
+
+ var n = 0;
+ $("div.enterleave").mouseenter(function () {
+ $("p:first", this).text("mouse enter");
+ $("p:last", this).text(++n);
+ }).mouseleave(function () {
+ $("p:first", this).text("mouse leave");
+ });
+}
+
function test_prop() {
var $input = $(this);
$("p").html(".attr('checked'): " + $input.attr('checked') + "
"