0

We had the third party create a website for us and on one of the pages, as the page content is loaded, the content from one of the modals is visible. Once the page has finished loading it disappears but it is very ugly and distracting. Looking at the HTML in the browser inspect, it appears a _show class is being added to an '' tag but I'm not sure what is creating that tag as it appears to be generated by the code itself. As near as I can tell, the content that creates the modal and it's behaviour is below. I'm wondering if there is some way to set it to initially be hidden without breaking how the modal is supposed to work:

<div class="product-shortdsc">
     <p><span>Lorem ipsum texty stuff</span></p>
     <p><a id="luxe" class="greenfont" href="#">Detailed specs</a></p>
</div>
<div class="row">
 <div id="modal6">
  <div id="luxe" class="tabcontent">
   <div class="tablewrapper">
    <div class="fpackage">
     <div class="name">Spec category</div>
      <ul>
       <li>detail 1</li>
       <li>detail 2</li>
      </ul>
     </div>
    </div>
   </div>
  </div>
 </div>
<script type="text/javascript" xml="space">// <![CDATA[
require(
    [
        'jquery',
        'Magento_Ui/js/modal/modal'
    ],
    function(
        $,
        modal
    ) {
        var options = {
            type: 'popup',
            responsive: true,
            innerScroll: true,
            buttons: [{
                text: $.mage.__('Close'),
                class: '',
                click: function () {
                    this.closeModal();
                }
            }]
        };

        var popup = modal(options, $('#modal6'));
        $("#luxe").on('click',function(){
            $("#modal6").modal("openModal");
        });

    }
);

// ]]></script>
  • Check reference : magento.stackexchange.com/questions/128199/… – Suresh Chikani May 10 '18 at 5:41
  • OK, but the problem is that the element that is being modified to _show isn't in the block, it's apparently added by code. So if I'm going to add a 'display hidden', how is the code going to know to make that container down visible if I'm unable to modify the block it's modifying? – Scott May 10 '18 at 21:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.