-
Notifications
You must be signed in to change notification settings - Fork 142
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dynamic height #4
Comments
Well, actually I have the same issue. I have tried to expand the height on .og-expander to 100% and also .og-expander-inner to 100% to no avail. The description paragraph is still the same size and it does not get extended by the amount of text. Any help would be greatly appreciated. |
Got the same issue, is there any chance we could adjust the fixed height in the javascript and being able to expand to a variable height, depending on the content inside. Thanks a lot in advance. |
I got same issue..minHeight from grid.js is not functional very well |
I too would love to know how to size .og-expander based on the height of the content. |
+1 |
If someone tells me how to make the thing calculate and change the height of the expanded div every time a thumbnail is clicked then I'll get it to work. Pretty much what I did was to change the this.$description = $( 'div class="divname">/div>' ); (ADD THE < and <, they wouldn't show in the comment) and added Marginals : 110 to the settings then |
I got it to work.
P.S. I do not know javascript or jquery, so all this is just a "lucky guess" ;) |
Вот решение: calcHeight : function() {
|
I arrived at a similar solution to djredhat and while it works, the following issue remains: If, say, the first item I expand has an .og-details area of 200 pixels height and then I expand another which has 500 pixels, the plugin will open it with the height of the first item i clicked and so the content will be cut off. This is rectified by closing the item and opening it again but if you open one first and then click on another, it retains the heigh of the very first item you clicked. |
Same issue, slightly different implementation. Rather than using data attributes, I have an AJAX calling populating each expanded panel. I too have a similar solution for calculating the height, but am seeing the same issue as @aholsteinson where if I click on items in the same row, their increased heights are never removed from grid li, so when i click an item on a different row, the expanded grid is closed, the the increased height remains, leaving a large gap between that row. My solution was to force the heights to return to their original size by adding a panel-closed class to all siblings of the clicked grid-item that resets/re-enforces the original height. |
I've managed to get a pretty good fix for what I needed. This code will get the height based on the content of the img side of the dropdown (which for me was the bigger side). I also stack my content for responsive so have used a media query to add both heights if the screen is smaller than 800px wide. The + 50 that I add is to account for the padding within my box.
|
Well djredhat solution works only once with some issues, also every time you click an image it will keep returning the same height of the image and content of the first thumbnail photo you clicked. The solution is: settings = { Then you have to edit the `
` Then replace the following in update function: where it says
|
Does anyone have an idea on how to make the height of the preview dynamic, based on the height of the content?
The text was updated successfully, but these errors were encountered: