Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7748545
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T10:48:47+00:00 2026-06-01T10:48:47+00:00

I have some divs that have dynamic heights controlled by a ‘click’ function as

  • 0

I have some divs that have dynamic heights controlled by a ‘click’ function as below:

$('.expand').click(function() {
  $(this).next('.collapse').slideToggle();
});

I am attempting to apply the jQuery wookmark plugin to the divs, and it works, apart from when their heights are dynamically resized by expanding one of the sections. From the documentation, I copied over one of the examples to my code, and the dynamic height works

        $(document).ready(new function() {
          // Prepare layout options.
          var options = {
            autoResize: true, // This will auto-update the layout when the browser window is resized.
            container: $('#container'), // Optional, used for some extra CSS styling
            offset: 30, // Optional, the distance between grid items
            itemWidth: 300 // Optional, the width of a grid item
          };

          // Get a reference to your grid items.
          var handler = $('.outerwrapper');

          // Call the layout function.
          handler.wookmark(options);

          // Capture clicks on grid items.
          handler.click(function(){
            // Randomize the height of the clicked item.
            var newHeight = $('img', this).height() + Math.round(Math.random()*300+30);
            $(this).css('height', newHeight+'px');

            // Update the layout.
            handler.wookmark();
          });
        });

You can see this working here. How can I make it so that when you click one of the headings inside the divs, the layout updates, as it does in the example. Thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T10:48:49+00:00Added an answer on June 1, 2026 at 10:48 am

    Usually third party jQuery plugins include some kind of “Refresh” or “Resize” function.

    Taking a quick look at the function, it doesn’t appear to have one; however, since there is an “autoResize” option (which will reload the layout on browser resize), you could simply create a click event that triggers the “resize” event like so:

    JAVASCRIPT:

    $("h1.resize").live("click", function()
    {
        $(window).trigger('resize');
    }); 
    

    http://api.jquery.com/trigger/

    http://api.jquery.com/resize/


    EDIT:
    Re-reading the question again,
    Looks like this:
    handler.wookmark();

    should refresh the layout (based on your posted code). So you should be able to use that instead of the resize trigger.

    $("h1.resize").live("click", function()
    {
        handler.wookmark();
    }); 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have some divs that have dynamic heights controlled by a 'click' function as
i have some dynamic code that will make a list of divs. i want
EXAMPLE: http://jsbin.com/ewiko4/5/ So I have some Dynamic divs that I need to figure out
I have some DIVs that I am using JQuery to hide and show using
I have this code Math.min(someVariable, 500)) I also have some divs which I have
I have some HTML that looks like this: <div class=MyClass></div> <div class=MyClass></div> <div class=MyClass></div>
So.. I have a dynamic width page. Below, the wrapper div centers the divs
So.. I have a dynamic width page. Below, the wrapper div centers the divs
I have some divs that I want to display under some specific conditions in
I am using jQuery 1.4.3. I have some divs that have microdata in them

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.