By Fagault Eric on Wednesday, 25 January 2017
Posted in General
Replies 1
Likes 0
Views 160
Votes 0
Hello,
I would like to ask two questions about refreshment.

Where can I set the timing for refreshing notifications?

I would also like to refresh the modules on a regular basis
Mod_easysocial_users
mod_easysocial_friend_suggestions
Mod_easysocial_recentpolls
mod_easysocial_friend_suggestions


They are all in POSITION-7 of the Template, I thought that refreshing the position would suffice, I deposited a script in the index.php file of the Template (PROTOSTAR) just before reframing the tag </ body> No influence.

Here's the script, do you think this is a good method?

<script type="text/javascript">
jQuery(document).ready(function($) {
setInterval(function() {
$.ajax({
url: '<?php echo JURI::getInstance()->tostring() ?>',
success: function(a) {
$('#position-7').html($(a).find('#position-7').html());
}
});
}, 30000);
});
</script>

Best regards.

Eric
Yes, you can use above code to achieve this but you have to make sure this element '#position-7' is it exist on your page.

And I would advise you set the time interval longer a bit, i suspect it will make your site performance heavy.
·
Wednesday, 25 January 2017 13:57
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post