anchor tag jquery hover event

sam
sam
Member
378 Points
48 Posts

Hi,

I am try to add hover event by JQuery as:

$("#anchorNotification").hover(function () {
$.ajax({

type: "get",
url: $.getUrl("Notification"),
contentType: "application/json;charset=utf-8",
dataType: "html",
success: function (data) { $("#dvNotification").html(data); $("#dvNotification").slideDown();},
error: function (data, status) { }

});
});
 

I want to stay the notification div after mouse out. how can I do?

Views: 9004
Total Answered: 3
Total Marked As Answer: 0
Posted On: 18-Nov-2015 02:58

Share:   fb twitter linkedin
Answers
NiceOne Team
NiceOne...
Editor
1382 Points
14 Posts
         

Hi Sam,

Just do one thing, hover method takes two parameter in second parameter you can do some like that:

$("#anchorNotification").hover(
function () {
$.ajax({
type:"get",
url: $.getUrl("Notification"),
contentType:"application/json;charset=utf-8",
dataType:"html",
success:function (data) { $("#dvNotification").html(data); $("#dvNotification").slideDown(); },
error:function (data, status) { }
});
},function () { });

 

Posted On: 18-Nov-2015 04:06
sam
sam
Member
378 Points
48 Posts
         

Hi,

function () { }

Is there need any code.

 

Posted On: 18-Nov-2015 05:18
NiceOne Team
NiceOne...
Editor
1382 Points
14 Posts
         

Hi Sam,

You just take it as blank.

 

Posted On: 18-Nov-2015 05:23
 Log In to Chat