Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1240963
    cohen611
    Participant

    Hi,

    I have several grids that I put inside template files. These grids aren’t loading properly, as in when they first load they’re contained inside a very small area and after some time (it varies, could be seconds, could be minutes) they expand. Why could this be?

    Thanks.

    #1240967
    cohen611
    Participant
    This reply has been marked as private.
    #1241171
    Rupok
    Member

    Hi there,

    Thanks for writing in! To assist you with this issue, we’ll first need you to provide us with your URL. This is to ensure that we can provide you with a tailored answer to your situation. Once you have provided us with your URL, we will be happy to assist you with everything.

    #1243036
    cohen611
    Participant
    This reply has been marked as private.
    #1243362
    Lely
    Moderator

    Hi There,

    I can see a javascript error when I check.
    (index):5698 Uncaught TypeError: Cannot set property 'placeholder' of null(…)
    Please try to update this line:
    document.getElementById("comment").placeholder = ("Type your response here...");
    To this:
    document.getElementById("comment").placeholder = "Type your response here...";

    Do let us know how this goes.

    #1243704
    cohen611
    Participant

    Thank you for pointing that out. I have fixed the error but the grids are still acting funny. Any other suggestions?

    #1244469
    Rad
    Moderator

    Hi there,

    Ah, it’s because grids are based on container’s dimension. Since tab content is hidden, the tab’s dimensions of 0 width and 0 height. All we need is to retrigger it 🙂

    Please add this code to Admin > Appearance > Customizer > Custom > javascript

    var tab_timeout = 0; //to avoid performance issue
    jQuery('.info_tab').on('click', function() {
    
    clearTimeout( tab_timeout ); //let's end in every click
    
    tab_timeout = setTimeout ( function() { jQuery(window).resize(); } , 300); //make sure it's triggered only after click (300ms)
    
    } );

    Hope this helps.

  • <script> jQuery(function($){ $("#no-reply-1240963 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>