Feature request. Number of items in slider on mobile devices
-
A setting for the number of displayed items for mobile devices would be nice. I have added the following javascript in the settings javascript input box to handle mobile devices and displaying a certain number of items in the slider if it is a mobile device. I had added seven items in a slider and on a mobile device that puts items on top of each other.
let details = navigator.userAgent;
/* Creating a regular expression
containing some mobile devices keywords
to search it in details string*/
let regexp = /android|iphone|kindle|ipad/i;/* Using test() method to search regexp in details
it returns boolean value*/
let isMobileDevice = regexp.test(details);if (isMobileDevice) {
const myElement = document.getElementById(“gpsc–products-55983”);
myElement.setAttribute(“data-slidesperview”, “3”);
}do note that the number in gpsc–products-55983 is the id of the slider for my slider and could be something else.
- The topic ‘Feature request. Number of items in slider on mobile devices’ is closed to new replies.