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]
- ajax, right way to do it and make it works?
- Using the echo command adds unwanted br tags to source
- custom fields wordpress
- Why the JavaScript code is ignored from wp editor?
- Is there a way to programmatically create multiple pages utilizing the same template but different content from a json file?
- Populate dropdown with Child Pages based on Parent Page chosen
- Ajax load more posts with multiple tax query
- How to store data from multiple forms using ajax and php
- WordPress Sending data to Ajax with select option
- search and replace preword from author
- Embed html in php code
- WordPress ajax doesn’t display object method on jQuery .change() function
- Ajax loaded form replaces form action with Ajax url
- prevent default not stopping page refresh. Passing form information to and from php with ajax in a wordpress site
- How to design a table based on css values set from admin/dashboard
- WP grandchild categories in nested ul li
- Pass Category Name, Description and Photo into variables to pass to jQuery
- Use DOMDocument with ob_start breaks my HTML code
- Adding Custom Slider
- Ajax date_query not working past the first iteration
- Ajax request not sending to server and returning – wp-admin/admin-ajax.php 400
- How to change redirection route to a php page for making it only accessible by logged-in members?
- Why ajax doesn’t work on certain wordpress hooks and reload the page instead?
- AJAX pagination, update current page
- Limit Widgets to Sidebar ID’s
- Save Search System
- adjust section according to country?
- populate form fields in a loop with ajax
- dynamic dependent select dropdown
- Change “add to cart” button color based on Woocommerce product category [closed]
- selected option if current category is the value
- How can I get the values of my WordPress $wpdb query in Jquery?
- Ajax request returns ‘Array’. How to output the actual results?
- Ajax load more button for comments wordpress
- Slick + PHP + ACF + JQuery slide reveal not working
- How to add a do_action on refreshing of WP customizer?
- How to remove ?wp-mce-4103-20162941
- Customize position of social icons in upme plugin [closed]
- Why Won’t My Inputs in a form with a Get method work together?
- parts of url disappear when using # inside href=”” [closed]
- Settings API callback function inserts html quotes from nowhere
- Input data from email form not going to JSON file
- How to get the value of input hidden html from text editor to custom page template?
- Gravity form built in Captcha
- Menu jumping when calling it via PHP
- Different post styles depending on category
- How create a Shortcode with hover and complex options
- How do I remove the product thumbnail link from a specific div in Woocommerce? [closed]
- Setting value of session with Ajax not working
- Click a radio button must set textfield value
- Dot is not added at the end of href
- Position banner to right of logo in header – messed up my header file
- Commenting out unwated CSS/scripts in HTML with PHP
- [jQuery]Adding shortcode
- multiple taxonomy select display only one in front end
- Display parent and child taxonomies in separate drop down select fields
- Show success or error messages in Ajax response to WordPress custom registration form
- How to add a Custom Mailchimp AJAX Newsletter Subscribe Form
- Add / Update Custom Fields After Select Pictures in Media Window
- Post repeating with infinite scroll
- Plugins not working on AJAX requests
- How to separate HTML and WordPress files
- Add .htm extention to a custom taxonomy
- Login to wordpress by clicking a link and specifying usernaname and password in url
- Fancybox type popup window that’s not an iframe
- How to disable controls in theme customizer?
- Auto 301 to full post permalink? (using : /archive/%post_id% to %post_name% )
- Can I use a jQuery Ajax request in Code Snippets Plugin for WordPress?
- JQuery calling a Custom PHP function (Works in Dev but not in WordPress)
- Jquery function working in Dev Console but not otherwise [duplicate]
- How do I add a custom css to all posts without affecting homepage css? [closed]
- Form Security: nonce vs. jQuery
- How do I Import / Upload Files with jQuery AJAX?
- Make PHP work with HTML tags
- WordPress admin-ajax.php 400 bad request
- How to include this jQuery File in wordpress?
- Why does wp_head hook my functions to the beginning of my source code?
- Noscript not working as it should in wordpress site
- WordPress Ajax Call inserting data but success response false
- Show latest posts in a plain HTML website custom widget [closed]
- Automatically set all tags to have a height of 0 if there is no content inside the tag [closed]
- How to convert select to HTML with PHP tags inside of it [closed]
- Is this spyware on my site or a real Java update?
- Syntax error when I try to insert my loop into an unordered list? [closed]