Bx Slider not displaying second slide on mobile devices

Encountering an issue with my bx slider. It functions properly on desktops, and even when you resize the screen down. However, on mobile devices, the second slide image disappears.

You can view the live site here:

This is the HTML code used:

<ul class="bxslider">
<li><img src="<?php echo get_template_directory_uri(); ?>/images/penthouse-bedroom.jpg" /></li>
<li><img src="<?php echo get_template_directory_uri(); ?>/images/reception1.jpg" /></li>
</ul>

<!--BX Slider Plugin-->
        <script type="text/javascript" src="<?php bloginfo("template_url"); ?>/js/jquery.bxslider.js"></script>
        <script type="text/javascript">
                $('.bxslider').bxSlider({
            infiniteLoop: true,
            auto: ($(".bxslider li").length > 1) ? true: false,
            pager: ($(".bxslder li").length > 1) ? true: false,
            controls: false
        });

        </script>

I am unsure of what's causing this issue, any assistance would be greatly appreciated.

Lee

Answer №1

I encountered this issue while using Chrome's device emulator with the Nexus 5 setting. It appears that the slide which appears blank on mobile devices contains an image tag with a width and height set to 0.

<img src="http://mistleymanor.com/wp-content/themes/Mistley-Manor/images/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="e89a8d8b8d989c818786d9a8da90c682988f">[email protected]</a>" width="0" height="0">

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

When it comes to managing lists in Rails, the Ajax sorting feature struggles to accommodate the frequent movement of items by users

Within my rails application, I have implemented a feature that allows users to sort records by simply click/drag/dropping them to rearrange the order. The update action is triggered after each reordering process, where the old_index and new_index of the it ...

Calculate the total value of the checkboxes that are either selected or unselected, and display the result

I am currently working on a project that involves checkboxes within labels. I need to extract the values of the selected checkboxes, calculate their sum, and then display the total in a Div below. The total will be updated dynamically as checkboxes are se ...

Comment sections that refresh automatically after being posted

I am determined to provide a clear explanation. Despite having some code, I am uncertain about how to make it clone comments and add new ones with user inputted text. Below is the snippet of code I am struggling with: <!DOCTYPE html> <!-- this i ...

What is the best way to eliminate excess space on the right side in Bootstrap 4 while in mobile view?

I'm struggling to understand why this layout is not responsive on mobile devices, triggering a bottom scroll bar at around 616px. I'm looking for a solution to hide the scroll bar at least until 414px for iPhones and other smartphones. I've ...

What is the best way to design an HTML table that features alternating colors for each row and column?

I recently came across this image showcasing a beautifully designed table: https://i.stack.imgur.com/6K63q.png The current HTML code I have applies colors to every even line, including the year columns and subcolumns. Is there a way to assign unique mixe ...

Swap out a paragraph with a city name fetched from a JSON file

While working on a weather app, I encountered an issue. The app needs to automatically detect the user's location and display the appropriate temperature along with the city name. I have been trying to fetch data from JSON to replace the placeholder t ...

When rendering, HTML characters are not translated

My JavaScript code generates the following HTML structure: <div contenteditable="false" tabindex="0" class="ProseMirror"> <p> didn't project a significant increase</p> </div> When rendered in the browser, it shows the cha ...

Update values of Name, Longitude, and Latitude within the Google Maps API using JQuery

I am currently working on a feature for my website where a user can select a place from a list and have its Name, Longitude, and Latitude displayed on a map for easy identification. However, I am facing an issue with updating the values on the map when th ...

Maximizing the worth of itemtype using jQuery: A guide

My goal is to include an 'itemtype' attribute in the body tag, body.page-body.ng-scope.device-lg(itemscope='', itemtype='') I attempted the following method $('body').add(itemtype='t1'); Unfortunately, ...

How can I reference a .php file located in a different directory?

Within my file named "index.php", there is a script provided below: <?php $pagina = empty($_GET['p']) ? 'home' : $_GET['p']; switch ($pagina): case 'contato': $titulo = 'Contato '; $keywords ...

A pair of vertical sliders

I am currently troubleshooting a website located at . It seems that there are two vertical scroll bars appearing on both the home page and product page, such as here: Interestingly, these extra scroll bars do not appear on the category page located here: ...

Enable Submit Button on Click Using jQuery

I'm encountering an issue with my web page that features a submit button. The code for my submit button is shown below: <button type="submit" class="btn btn-primary wait-on-click"> <span>Submit</span> </button> Upon clickin ...

I am in need of a workaround for the HTML oninvalid Event Attribute in the specific context of my code. Any suggestions would

Is there a solution available for the issue with the HTML oninvalid Event Attribute not functioning correctly in Safari and Google Chrome? When testing my application, I found that when entering an invalid input (a number) in the name field and then correc ...

Launching an app using Electron JS incorporating an Express backend and a standalone HTML frontend

I have a unique situation where my application consists of separate ExpressJS backend and HTML front-end modules. The ExpressJS backend is located at root/scripts/server.js Meanwhile, the HTML front-end is situated in root/index.html. The front-end utili ...

Preventing window resize from affecting print screen content in Angular 8

I'm struggling with a print button feature in my Angular 8 project. When the window is resized, the content within the print window also resizes, which is not the behavior I want. I've tried a couple of solutions, but nothing has worked so far: 1 ...

The system is unable to show real-time data at the moment due to an error message being returned: {"error": "'QuerySet' object has no attribute 'body'"}

I am looking to integrate real-time data display in a Django application using Ajax. My goal is to allow users to see what they are typing as they type it, and I am achieving this by utilizing Django's JsonResponse with the following method: def get_ ...

Comprehending the positioning of elements enclosed within a parent <div> tag

I'm struggling to understand why: vertical-align - isn't behaving as expected in this scenario, even though the elements are aligned along a baseline and are inline elements. I've experimented without using float but that didn't sol ...

Update the content of a div element using the information from a JSP file using

I have encountered an error when trying to replace the content of a div with that of a JSP file. The error message I receive is "Uncaught SyntaxError: Unexpected token ILLEGAL." Interestingly, this issue only arises when the JSP file contains multiple lin ...

Position the flex item at the bottom of the container

Looking for a solution to create a container that takes up the full window height and width? Inside this container, I want to have a form that is centered both vertically and horizontally. Additionally, I want some text at the bottom baseline of the contai ...

Tips for Connecting Jquery Ajax to the Parent Element

With the generous help of everyone, I was able to resolve my issue. By changing 'context:' from 'this.parentNode' to simply 'this', I managed to correct the problem I was facing with running multiple instances. Despite still f ...