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