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]
- jQuery document.createElement equivalent?
- The RPC server is unavailable. (Exception from HRESULT: 0x800706BA)
- Export html table data to Excel using JavaScript / JQuery is not working properly in chrome browser
- What do curly braces in JavaScript mean?
- Moment js date time comparison
- How to create a JQuery Clock / Timer
- How can I get the last character in a string?
- How do I check whether a checkbox is checked in jQuery?
- Reload an iframe with jQuery
- How to manage a redirect request after a jQuery Ajax call
- How to go to a URL using jQuery?
- How to close a window using jQuery
- Convert UTC date time to local date time
- Maintaining image color and quality when uploading using custom sizes
- Bulk edit wordpress images alt and title attributes
- Upload Image Not accessible
- Including javascript for a shortcode
- Caption in Page adding unwanted 10px to width
- How to add a media with PHP
- Get original image from thumbnail URL
- Dropzonejs with WPCF7 [closed]
- Bulk image rotation
- Can I the caption shortcode to set caption to a data attribute, and with the image’s alignment intact?
- get the image of the post
- Problem in loading javascript in footer
- Using shipped version of jquery
- Update image links in database
- Pull Random Attachments With Pagination
- Upload media files to Amazon S3
- How to get default image sizes attribute
- Remove the inline styling added in wp_get_attachment_image()
- Image not shown in the theme as it’s showing in HTML template [closed]
- Broken Images until Page Refresh
- Get image from parent category
- Images attached to posts from library link to 404 error page
- fetch images and videos
- Specific image size is being generated without being registered
- Should I not compress my jpeg files before uploading to avoid double compression?
- How to display title of attached image in post?
- Getting thumbnail of uploaded image
- Allow users to contribute images to a post
- Can’t add image to site via php
- Save Image in wp_options-Table
- Image upload error?
- Image not showing using a custom function and get_post_meta
- Random home page background images with caption text
- How to add “alt” attribute for image during upload at WP front-end?
- Excluding post thumbnail from the attachment.php when using wordpress gallery
- Query String Filtering API
- WordPress PHP custom function is causing 500 Internal Server Error Connection Timeout
- Post-processing of the image failed
- Get post thumbnail in specific size
- Customizer add query to preview URL
- Text not wrapping properly around image in WordPress Visual Editor [closed]
- Broken images in media library
- Featured image appears in header
- Preventing the image-post problem from ahead (edit: without redirects)
- How can I stop WP Image Editor upscaling from looking so pixellated?
- Javascript in plugin not working
- Declare global variable that can be used on other function
- How to show images uncropped after uploading?
- Black and White Thumbnail in WordPress Gallery
- Saving a post, content filtering and user levels
- How do I get my nav menu to show sub pages?
- How to extract specific image meta for all images?
- Are image addresses security relevant?
- Custom jQuery plugin not working
- notify users when changed database