I update partial of html page by call ajax function Every 5 Minutes, there are some element object in partial that by hover on open a popup windows.
my code run the first one works fine, but after a update Does not work properly and per-hover opens two popup window.(hover function call twice)
index.php
<script type="text/javascript">
function refresh2() { <? php
echo CHtml::ajax(array(
'url' = > CController::createUrl("browsingpap/UpdateAjax"),
'update' = > '#type', )) ?>
}
window.setInterval("refresh2()", 300000);
</script>
<div id="type">
<!-- update here after call ajax function--->
</div>
updateAjax
<script type="text/javascript">
$(document).ready(function() {
$("#goli").hover(function() {
$('#popup5').bPopup();
});
});
</script>
<div id="popup5" style="display: none;"> <span class="button b-close"><span>X</span></span>
<div class="content">popup window</div>
<div id="goli">hover me for show a popup</div>
</div>