If you had for example,
<img src="https://wordpress.stackexchange.com/questions/228932/rdp_banner.jpg" id="logoimage">
You could just do…
add_action('init','checkvisitcookie');
function checkvisitcookie() {
if (isset($_COOKIE['firsttimevisit'])) {return;}
setCookie('firsttimevisit','1',100*365*24*60*60);
add_action('wp_footer','fadelogoout');
}
function fadelogoout() {
echo "<script>
jQuery(document).ready(function() {
setTimeout(function() {
jQuery('#logoimage').fadeOut();
}, 5000);
});
</script>";
}
Just to make it almost relevant to WordPress 😉
Related Posts:
- Display images from JS?
- Set default image link target in Gutenberg image block
- How to modify image editor dialog options on WordPress?
- Graphing libraries for WordPress [closed]
- 3.5 media.editor: what is the event listener for choosing an image?
- JavaScript and images files are not recognized
- Multiple images with Media Uploader on front-end
- Update an image block style programatically
- How can I use cached images in an AJAX response?
- Help to upload post attachments from Ajax
- Image LazyLoad plugin not loading jQuery dependancies with wp_enqueue_script in WP 3.3.1
- How to use Facebox in WordPress theme?
- Howto use WP built in Thickbox for images?
- How to get the image-URL from Media-Upload in a post?
- Using jQuery to automatically add class only to gif images in WordPress database [closed]
- How do I include javascript/jquery image resizing with wordpress?
- Fancybox just loading small white square
- Image modification
- Hide Title tag on image Hover
- Landing Page with HTML CSS JS and Images on wordpress
- Built-in image lazy loading: Does it come with a polyfill for older browsers?
- Access html element in media modal with jQuery
- Images names not inserting in WordPress Database from Dynamic Add / Remove fields
- js alert in add_filter function for image_send_to_editor
- WordPress Javascript displaying an image Question
- Issues Adding a jQuery Image Slider
- Select image and display from textfield?
- Thickbox not displaying just the image, instead showing full page in lightbox
- 3.5.x Theme Customize: Handling Custom Control Requests
- WordPress: Preload next post images
- Theme using masonry layout script rendering overlaped images in Google Chrome [closed]
- Script not working in WordPress [duplicate]
- ‘Add Media’ to post – filter images
- Is possible to open directly the core WP image editor on a modal?
- How to prevent the “Confirm Form Resubmission” dialog?
- enabling right click:
- JavaScript sleep/wait before continuing [duplicate]
- Why does my JavaScript code receive a “No ‘Access-Control-Allow-Origin’ header is present on the requested resource” error, while Postman does not?
- How to change CSS using jQuery?
- How to properly use jsPDF library
- Cross-Origin Read Blocking (CORB)
- How do I link a JavaScript file to a HTML file?
- How do I redirect to another webpage?
- How do I redirect to another webpage?
- Cross-Origin Read Blocking (CORB)
- jQuery append() vs appendChild()
- How to replace innerHTML of a div using jQuery?
- Uncaught ReferenceError: $ is not defined?
- Uncaught ReferenceError: jQuery is not defined [duplicate]
- What does [object Object] mean? (JavaScript)
- How do I check whether a checkbox is checked in jQuery?
- syntax error: unexpected token <
- Error OPTIONS net::ERR_CONNECTION_REFUSED
- ReferenceError: $ is not defined
- Uncaught ReferenceError: jQuery is not defined [duplicate]
- What does [object Object] mean?
- Remove class using jQuery
- How do I check whether a checkbox is checked in jQuery?
- jQuery document.createElement equivalent?
- How to make history.back() without getting a warning on the browser to reload the page?
- JQuery – $ is not defined
- Cannot read property ‘push’ of undefined when combining arrays
- Why does my JavaScript code receive a “No ‘Access-Control-Allow-Origin’ header is present on the requested resource” error, while Postman does not?
- Toggle show/hide on click with jQuery
- convert Hsl to rgb and hex
- How to set time delay in javascript
- Pure JavaScript equivalent of jQuery’s $.ready() – how to call a function when the page/DOM is ready for it [duplicate]
- JQuery – $ is not defined
- Cannot read property ‘push’ of undefined when combining arrays
- JavaScript error (Uncaught SyntaxError: Unexpected end of input)
- Automatically pausing html5 video as the ‘next’ button is pressed (javascript/ jquery)
- jQuery .on(‘change’, function() {} not triggering for dynamically created inputs
- How to create a jQuery function (a new jQuery method or plugin)?
- jQuery: Wait/Delay 1 second without executing code
- JavaScript error (Uncaught SyntaxError: Unexpected end of input)
- Failed to load resource: the server responded with a status of 500 (Internal Server Error) in Bind function
- Scroll to an element with jQuery
- Download File Using JavaScript/jQuery
- How to solve ‘Redirect has been blocked by CORS policy: No ‘Access-Control-Allow-Origin’ header’?
- How to deal with net::ERR_SSL_PROTOCOL_ERROR?
- How can I scroll to an element using jQuery?
- jQuery.click() vs onClick
- jQuery setTimeout() Function [duplicate]
- jQuery Get Selected Option From Dropdown
- Disabling and enabling a html input button
- Scroll to an element with jQuery
- Download File Using JavaScript/jQuery
- Check if checkbox is checked with jQuery
- How can I refresh a page with jQuery?
- How can I refresh a page with jQuery?
- Getting Error “Form submission canceled because the form is not connected”
- How to add jQuery code into HTML Page
- jQuery equivalent of JavaScript’s addEventListener method
- How can I get the data-id attribute?
- document.getElementById vs jQuery $()
- Check if checkbox is checked with jQuery
- How to import jquery using ES6 syntax?
- How to filter an array/object by checking multiple values
- What does jQuery.fn mean?
- Getting Error “Form submission canceled because the form is not connected”