One portion of the page is not appearing on the mobile version

I'm having an issue with one of the sections on my website not displaying correctly in mobile view. I've checked within WooCommerce and the PHP file, but everything appears to be fine. I attempted to override the section using !important, as well as adding a media query targeting those elements, but unfortunately, it's still not working. This particular section is integrated with WooCommerce, so any advice related to that would be greatly appreciated.

It seems like I may have overlooked something in my scripts.

jQuery('form.variations_form').on( 'show_variation', 
    function(event, variation){
      let output_date='';
      let scheduled_date_string = variation.scheduled_date;
      console.log(variation.scheduled_date);

      let button_text_original = 'Buy Online';
      let button_text_preorder = 'Pre-Order Now';

      if (!scheduled_date_string) {
        output_date= '7 - 10 Business Days';
        jQuery(this).find('button.button').html(button_text_original);
      }else{
        let current_date = new Date();
        let scheduled_date_parts = scheduled_date_string.split('/');/*date format must be in d/m/Y */
        let scheduled_date_year = parseInt(scheduled_date_parts[2].length<4 ? '20'+scheduled_date_parts[2]:scheduled_date_parts[2]);
        let scheduled_date_month = parseInt(scheduled_date_parts[1]) - 1;
        let scheduled_date_day = parseInt(scheduled_date_parts[0]);
        let scheduled_date = new Date(scheduled_date_year,scheduled_date_month,scheduled_date_day);
        console.log(scheduled_date);

        if (current_date >= scheduled_date) {
          output_date= '7 - 10 Business Days';
          jQuery(this).find('button.button').html(button_text_original);
        }else{
          output_date = scheduled_date_string;
          jQuery(this).find('button.button').html(button_text_preorder);
        }
      }

      if (jQuery('.shipping-date-container').length) {
        jQuery('.shipping-date-container').html('Estimated to leave our warehouse by: <span class="shipping-date">'+output_date+'</span>');
      }else if(jQuery('body.single-product .et_pb_wc_title').length){
        jQuery('body.single-product .et_pb_wc_title').after('<div class="shipping-date-container">Estimated to leave our warehouse by: <span class="shipping-date">'+output_date+'</span></div>');
      }

    } 
  );
/* Estimated Shipping Date */
.shipping-date-container{
    font-weight: 500;
    color: #1e1919;
    font-size: 17px;
    line-height: 1.6em;
    margin: 10px 0;
}
span.shipping-date{
    color: #a13a18;
    font-weight: 600;
}

@media screen and (max-width: 980px){
  .shipping-date-container span.shipping-date{
    display: inline-block;
  }
}
<div class="shipping-date-container">
  Estimated shipping date: 
  <span class="shipping-date">31/07/2021</span>
</div>

Answer №1

Encountering a conflict with the usage of jQuery and the $ sign within the same script file. In my jQuery code, I specifically utilize jQuery instead of $ to avoid any issues.

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

Axio GET request in VueJS does not return a response body when using Amazon API Gateway

UPDATE: While Postman and browsers are able to receive valid response bodies from an Amazon API Gateway endpoint, other web applications are not. This is a basic GET request with no headers, and no authentication is needed for the API endpoint. The data is ...

Using Node.js, we can create a program that makes repetitive calls to the same API in a

My task involves making recursive API calls using request promise. After receiving the results from the API, I need to write them into an excel file. Below is a sample response from the API: { "totalRecords": 9524, "size": 20, "currentPage": 1, "totalPage ...

Asynchronously retrieving data in .NET using Angular

Initially, I am attempting to retrieve all projects from the database based on the provided userId from the URL. This operation is performed in the ngOnInit() lifecycle hook. Each project contains a field named Languages, which represents a list of objec ...

Continuing a Sequelize transaction after a loop

I am facing an issue where the transaction in my chain of code is committing immediately after the first loop instead of continuing to the next query. Here is a snippet of my code: return sm.sequelize.transaction(function (t) { return R ...

Achieving Perfect Alignment in Dreamweaver: Crafting a Stylish Header Container

Hello, I am currently working on a Dreamweaver site and have created a CSS style sheet within my template that includes a div tag called #HeaderBox. My goal is to make this box 40% of the screen's size, with specific pixel dimensions if necessary. I a ...

Utilize a node module within a web browser

Currently, I am utilizing the straightforward Refify npm module to manage circular structure JSON. It performs the task of stringifying a circular structure JSON object in Node.js for transmission to the client. Upon receiving the stringified JSON in my An ...

There are various iterations of html2canvas available

After upgrading html2canvas from v0.5.0 to v1.0.0, a specific function ceased to work on iOS. Therefore, I am interested in utilizing v0.5.0 on iOS and v1.0.0 on other devices. Is there a way to incorporate and switch between both versions of html2canvas ...

Remove the Prisma self-referencing relationship (one-to-many)

I'm working with this particular prisma schema: model Directory { id String @id @default(cuid()) name String? parentDirectoryId String? userId String parentDirectory Directory? @relation("p ...

Ways to position a flexbox child at the bottom of its container

Utilizing Flexbox to arrange different content in a panel, there is an issue with the positioning of icons within each panel. The fourth icon wraps around and aligns with the first one at the top of its container, instead of lining up with the third icon a ...

What steps should be taken to switch a class from one li element to another and remove it in the process?

As I develop the navigation bar for my website, I am faced with a challenge. I want to create a button-like behavior where clicking on an li element triggers a drop-down section underneath it without using the # attribute to prevent jumping to the top of t ...

Tips for sending information to a modal window

I need to transfer the userName from a selected user in a list of userNames that a logged-in user clicks on to a twitter bootstrap modal. I am working with grails and angularjs, where data is populated using angularjs. Set-Up The view page in my grails a ...

Prevent the navigation bar text from being truncated

The below code snippet: <div data-role="navbar"> <ul> <li><a href="#page_1" data-transition="none">Heading 1</a></li> <li><a href="#page_2" class="ui-btn-active ui-state-persist">Heading 2</a& ...

What is the best way to extract specific content from HTML and display it within a specific HTML tag using

#!/usr/bin/env python import requests, bs4 res = requests.get('https://betaunityapi.webrootcloudav.com/Docs/APIDoc/APIReference') web_page = bs4.BeautifulSoup(res.text, "lxml") for d in web_page.findAll("div",{"class":"actionCol ...

No response from jQuery's $.getJSON() function

I'm currently experimenting with jQuery by using a script that I wrote. As a beginner in learning jQuery, I am trying to read data from a .json file and display it in a div. function jQuerytest() { $.getJSON( "books/testbook/pageIndex.json", func ...

Tips for retrieving element height using Vue.js

I am attempting to retrieve the offsetHeight of an element but I keep getting undefined. When I use this code, it returns an HTML collection and everything works correctly: document.getElementsByClassName("plyr--full-ui"); https://i.sstatic.net/xurBa.pn ...

What are some reasons why the XMLHttpRequest ProgressEvent.lengthComputable property could return a value of

I've been struggling to implement an upload progress bar using the XMLHttpRequest level 2 support for progress events in HTML5. Most examples I come across show adding an event listener to the progress event like this: req.addEventListener("progress ...

Retrieving width and height of the content block inner in Framework7, excluding navbar and toolbar dimensions

Is there a reliable way to determine the width and height of the page content-block-inner, excluding the navbar and toolbar? This measurement can vary across different devices and operating systems. I attempted to assign an id to the content-block-inner a ...

Experiencing a console error which reads: "SyntaxError: Missing ) after argument list."

While working on configuring a new React CSR app and incorporating some boilerplate libraries, I encountered an error in the console: Uncaught SyntaxError: missing ) after argument list (at @emotion_react_macro.js?v=30f6ea37:29894:134) I am hesitant to ma ...

What is the best way to create extra space around elements without causing them to disappear off

Looking for a solution to add padding or margin to the right column of a two-column layout without pushing the content off screen? In my example, I've indicated where I would like the extra space to be with an arrow. When I try adding margin or paddin ...

What is the correct way to utilize the BigInt right shift operator and XOR in JavaScript?

After spending the entire day trying to figure out how to shift bits to the right in JavaScript, I realized that my test program written in C language was not giving the correct results for comparison. If anyone can guide me in the right direction, please ...