tabtab.js icon indicating copy to clipboard operation
tabtab.js copied to clipboard

Final height after finish loading

Open Messa1 opened this issue 10 years ago • 9 comments

Its seems like that the height change after a second after all content is loaded. In my test example is the content element (js-tabs-height) height 124 px; And after everything is loaded and a second it change value to 145 px;

I checked with document ready.

$( document ).ready(function() {
    console.log( "ready!" );
});

The "ready!" is listed before the change appears. I think there is some process problems with outerHeight().

I fix it for now for me with get the outerHeight after all TabsElements are defined.

Messa1 avatar Oct 21 '15 15:10 Messa1

Could you provide a codepen to demonstrate the issue perhaps?

gijsroge avatar Oct 21 '15 16:10 gijsroge

In a codepen everything works fine. http://codepen.io/anon/pen/OyzGwP

I will check also my other jquery code. When i found the problem i will post a comment.

//// When i comment some other jquery out i works. But also the position of the tabs make some change. For example when i put i above the slider it works.

So i use my Quick & Dirty fix for now.

var height = $( ".tab__content-item.active" ).outerHeight();
$( ".js-tabs-height" ).height(height);

Messa1 avatar Oct 21 '15 17:10 Messa1

I can confirm this bug as well.. Not sure how to fix it.. The active tab has a larger height than the .js-tabs-height ... can you please fix

z1haze avatar Apr 07 '16 18:04 z1haze

Provide me with a codepen that replicates the bug so I can debug. Thanks!

gijsroge avatar Apr 07 '16 19:04 gijsroge

I have the same problem. After web page loads, tabs have larger height than .js-tabs-height After changing tabs and going back to first one, it seems fixed, but after site refresh it's bad again.

This bug is NOT possible to replicate on CodePen as @Messa1 stated above, it's possible to get that bug only on production/development site.

If you would be willing to debug live site, I can make you an admin account on my Wordpress website.

Btw. have a look at: http://kari.sim3k86.linuxpl.eu/oferta/ You should understand what the bug is.

Waiting for answer, Cheers.

Sim3k86 avatar Jun 29 '16 19:06 Sim3k86

@Sim3k86 Try initiating tabtab on window.load.

gijsroge avatar Jun 30 '16 07:06 gijsroge

@gijsroge sorry for late answer.

I was initiating tabtab on load event from the beggining. Below script (except last 2 lines - yesterday's "Messa1 Quick & Dirty fix" which works) was placed before </body>

jQuery(window).load(function() {
    jQuery(".produkty").tabtab({
        startSlide: 1,
        animateHeight: true,
        fixedHeight: false,
        scale: 1,
        rotateX: 0,
        speed: 500,
        transformOrigin: "center right",
        rotateY: -90,
        easing: "easeInOutCubic",
        translateX: 0,
        tabMenu: ".menu-produkty",
        tabContent: ".zawartosc-produkty"
    })
var height = jQuery( ".zawartosc-produkt.active" ).outerHeight();
jQuery( ".js-tabs-height" ).height(height);
});

Like I wrote in my last message.. I can give you temporary access to website, on which you can debug that error.

screenshot-kari sim3k86 linuxpl eu 2016-07-19 11-34-47

Sim3k86 avatar Jul 19 '16 09:07 Sim3k86

Have you solved this problem?

ctiki avatar Mar 23 '17 00:03 ctiki

I've left it with above modified script, you can check how it works on http://kari.sim3k86.linuxpl.eu/oferta/

Sim3k86 avatar May 04 '17 17:05 Sim3k86