• My plugin (wp-photo-album-plus) requires a window resize after changing tab.

    When i add:

    jQuery(document).ready(function() {
        jQuery(".responsive-tabs__list__item").on("click", function(){
            jQuery(window).trigger("resize")}
        );
    });

    It does not add the event handlers,
    when i add:

    jQuery(document).ready(function() {
        setTimeout(function(){
            jQuery(".responsive-tabs__list__item").on("click", function(){
                jQuery(window).trigger("resize")}
            );
    	},1000);
    });

    it works, but 1000 ms is unreliable.

    How can i add this event handler the right way?

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author cubecolour

    (@numeeja)

    I don’t know if there’s a better way to do this. It is more of a workaround than a definite fix for the issue of content not being visible. If the content takes longer than one second to load in the page, I imagine that experimenting with the value would be the way to go.

    Thread Starter Jacob N. Breetvelt

    (@opajaap)

    I found out that any delay works; adding the eventhandler must just be done after all other onload events have been served to make sure the class responsive-tabs__list__item has been added.

    Thanx for a very usefull pugin.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to add window resize trigger’ is closed to new replies.