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 there a link to the “latest” jQuery library on Google APIs?
- JavaScript runtime error: ‘$’ is undefined
- jQuery animate backgroundColor
- How to convert selected HTML to Json?
- Why is the jquery script not working?
- JQuery Datatables : Cannot read property ‘aDataSort’ of undefined
- Simple throttle in JavaScript
- How to get current date in jQuery?
- Print the contents of a DIV
- How to Scroll Down – JQuery
- is there something like isset of php in javascript/jQuery?
- jQuery – Dynamically Create Button and Attach Event Handler
- Highlight a word with jQuery
- Fire oninput event with jQuery
- WP 4.4. responsive images browser choosing the “wrong” one
- Retina images – custom syntax for inserting images into post content
- Test to see if jQuery or Prototype is queued by another plugin?
- show author image in posts
- jQuery in header or footer
- Default Image Link Removal
- Replace Woocommerce Images
- Create Image Uploader for Widget
- WordPress Ajax always returns a 404 error
- How to copy and paste a picture found on the web to wordpress easily
- add_image_sizes ignoring crop sizes and using proportion
- Modify Custom Field in Media Library using JavaScript
- Dynamically add titles to post images if they are empty
- get_intermediate_image_sizes Get the Size Names but How Do I Get the Sizes?
- Is there a reason why my wordpress PHP page isn’t loading into my PHP template
- Cropping an image before inserting into a post
- custom image size with New Media Manager in wordpress 3.5
- Uploading images: ‘ø’ get replaced with ‘ø’
- SSL: How to make customizer images Protocol Relative in WordPress?
- Click loads template via ajax
- How to add qtranslate multi language support for media?
- Change the URL of an image from wp_get_attachment_image_src
- custom image dimensions (for gallery)
- Screenshot.png not showing up
- Do I need to resize an image to fit the post?
- Auto-detect javascript errors and warn theme user
- combining js scripts from a js newb [closed]
- Sending jsPDF documents to the server
- Heartbeat API: How to access data already enqueued?
- js file in root loading without
- wp_upload_bits does not retrieve images that do not have an extension
- Is there any action/filter hook to use when an image gets edited in the editor?
- Images will not display, when I call them up with html in wordpress, just two blank small spaces [closed]
- Force minimum image size and aspect ratio when uploading images
- Changing default img html markup but not in admin back-end?
- Is it possible to split Default WP Media directory to multiple Folder/Subdomain?
- Add srcset and sizes to older uploads?
- Change align classes for images
- Ho to add “Create Slider” option to default “Add Media” popup?
- Divi Theme – images not showing on front page [closed]
- Edit image results in copies of file being created
- Images in Media aren’t showing, not broken
- Fixing image names for a site being restored
- Upload Image using wp_insert_attachment and file url don’t have file extension
- Export xml use/import images from theme directory
- Fancybox type popup window that’s not an iframe
- WordPress Theme: replace logo image with title site if file doesn´t exist on server
- WordPress update leads to 404 error on admin page and signup. CSS mishap with all plugin related functions
- How to get dimension of Logo and Crest
- WordPress Missing Images
- Why is my JS not working on initial load?
- “Media Library” shows as empty, despite images being present
- Image shows up in editor, but not in published blog post