JQuery mouseenter not working in Chrome

Posted by Manorama under jQuery on 9/20/2013 | Points: 10 | Views : 3136 | Status : [Member] | Replies : 1
I implemented one applicaion in mvc using Jquery.My code is this .

<script type="text/javascript">
$(document).ready(function () {
$("#myDiv").mouseenter(function () {
var myVar = setInterval(function () { myTimer() });
function myTimer() {
setInterval(refreshPartial)
}
});
});
function refreshPartial() {
$.ajax({
url: '@Url.Action("TimerMethod", "Default1")',
type: "POST",
cache: false,
dataType: "json",
success: function (data) {
if (data == '1') {
$("#myMessage").show();
$(function () {
setTimeout(function () {
$("#myMessage").hide();
}, 5000);
});

return true;
}

else {
$("#myMessage1").show();
$(function () {
setTimeout(function () {
$("#myMessage1").hide();
}, 5000);
});

return false;
}
},
error: function () {
$('label[for=lblError]').html('Error in performing operation');
//alert('Error in performing operation');
}
});

return true;
}
</script>
<div id="myDiv" class="timer">
Timer Example</div>
<div id="myMessage" class="divstyle">
Record Available
</div>
<div id="myMessage1" class="divstyle">
Record Not Available
</div>

This functionality is working fine in IE9 and firefox also ,but its not working in "Chrome".
Please help me anyone.
Thanks & Regards
Manorama

ManoRama


Responses

Posted by: Bandi on: 9/20/2013 [Member] [MVP] Platinum | Points: 25

Up
0
Down
Refer this link
http://www.bennadel.com/blog/1805-jQuery-Events-MouseOver-MouseOut-vs-MouseEnter-MouseLeave.htm

Mark This Response as Answer
--
Chandu
http://www.dotnetfunda.com/images/dnfmvp.gif

Manorama, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response