Currently I have this code in my Wordpress theme:
jQuery(document).ready(function($) {
if ($('body').hasClass('post-template-default')) {
if(screen.width <= 991) {
setTimeout(function(){
swal({
type: 'info',
title: 'You can swipe!',
text: 'Swipe to Right or Left to navigate through posts.',
showConfirmButton: 'false',}) },1000); // alert }}});
But I want it to run just once and afterwards it should not be displayed anymore in the website.
How can it be done? :)