After thinking a lot, I have solved it myself in the following way:
if (document.documentElement.clientWidth < 900) {
$('video').each(function () {
const poster = $(this).data('poster');
$(this).attr('poster', poster);
});
}
Thanks to everyone
Related Posts:
- WordPress Ajax always returns a 404 error
- Load custom field value into div with AJAX
- Nice scroll to wordpress
- Show post in slider
- WordPress Multiple Navigation bars
- Replacing WordPress Icons (menu,icons32, etc)?
- WordPress cascading dropdown selection search based on Parent Page & Child Page
- How do I call a value from the datase using ajax
- Add other class content with reference class value
- How to use wp_ajax_set_post_thumbnail?
- If user has clicked link add class and store using PHP/WordPress
- Creating Log-In Page for backend server
- Bootstrap Carousel Indicators Won’t Cycle On Custom WordPress Theme
- Pass the updated value of aid from form using ajax
- What is the best way to get the first few post from WordPress in different divs using a loop?
- Load Meta box value into div AJAX [duplicate]
- How to enable button onClick functions and java script in wordpress post
- Retrieve POST data from AJAX call
- problem with ajax and the path to the php page
- Is there a reason why my wordpress PHP page isn’t loading into my PHP template
- Targeting single page with JS
- JS completely stopped loading but Files are found
- WordPress Wysiwyg Content not being displayed
- Click loads template via ajax
- How to retrieve the content (with a specific ID) via ajax by clicking a link tag
- How do I add HTML to a PHP function [closed]
- Loading jQuery in the footer after removing jQuery migrate?
- Sending jsPDF documents to the server
- wp_insert_post() is returning the correct post ID, no failure, but the post content does not get updated
- WordPress automatically adding html tag around PHP code
- Missing sidebar parameter “fix” – before_content
- How to get the POST TITLE using the POST ID?
- js file in root loading without
- WooCommerce – Reset quantity input field when variation changes
- Checking for new message using AJAX and PHP. Server overload?
- jQuery not defined
- Create another “Display Site Title and Tagline” checkbox, “Header Text Color” setting and control
- Load a page into a div with Ajax
- Converting HTML Template to WordPress Theme
- Pass Category Name, Description and Photo into variables to pass to jQuery
- Adding Custom Slider
- Change “add to cart” button color based on Woocommerce product category [closed]
- Ajax request returns ‘Array’. How to output the actual results?
- Slick + PHP + ACF + JQuery slide reveal not working
- Dot is not added at the end of href
- Show success or error messages in Ajax response to WordPress custom registration form
- How to add a Custom Mailchimp AJAX Newsletter Subscribe Form
- Fancybox type popup window that’s not an iframe
- Can I use a jQuery Ajax request in Code Snippets Plugin for WordPress?
- How do I add a custom css to all posts without affecting homepage css? [closed]
- Form Security: nonce vs. jQuery
- How to include this jQuery File in wordpress?
- What are the advantages/disadvantages of using jQuery DOM manipulation as opposed to PHP DOM manipulation?
- Is it save to use eval for a jQuery callback method coming from the database?
- Add data-id attribute to child page links
- WordPress plugin admin page – using WordPress function in linked php file
- Prevent redirect to wp-login.php
- A $_POST should occur when submit form but is not?
- How to use the wpsnonce clone post link?
- Shortcode to pull posts
- How to use the checked() function to check for a non-empty var
- How to add post thumbnail dynamically using Jquery?
- calling function in external js file
- Find out last 7 days of upload images, last week uploaded image from Gallery and display them in different pages
- Link to page with posts of specific type
- How to refresh a page from jquery [closed]
- Custom forms with HTML
- Wrap title and excerpt in a div (latest posts block)
- how to changes mobile menu toggle breakpoint in WordPress
- PHP inside echo HTML
- WordPress – Query specific category and automatically change category each month
- What are the advantages/disadvantages of ways to use php template files?
- Admin-ajax.php 404 error
- How to change PHP variables with AJAX request in WordPress
- Remove span tags from WooCommerce Downloads page
- How to enable HTML tags in category description without breaking the category page
- Can’t display anything through homepage text editor
- How to pass bloginfo(url) in a jquery
- Input field duplicates on form submit by jQuery
- How to echo a PHP code into WooCommerce variation product?
- Woocommerce custom attributes list help
- Access certain Entry in HTML-Table and pass the entry-data in WP not working [closed]
- include javascript Multiple files in wordpress through script.js
- ACF + WP + Slick Slider Repeater Slide Group PHP not Displaying [closed]
- Find the method which AJAX GET calls
- Code works on page-example.php by not category-example.php
- Add a downloaded JS file to WordPress
- WooCommerce – Print Processing orders [closed]
- How to call javascript function (jquery) in a shortcode?
- Add options to WordPress backend
- How to run ajax in WordPress Post?
- Automatically create a loop for post ID
- Add php function into .js file (for tinyMCE button)
- I am trying to call external database recieving error
- Save Option on Database
- JSON Object Value Show Undefine
- Parse error: syntax error, unexpected ‘}’ in
- Different behaviour between “include_once” and directly echoing out html code?
- How to use js variable to php in wordpress functions.php
- How to create different templates for woocommerce single-product.php?