Wednesday, June 5, 2024
 Popular · Latest · Hot · Upcoming
56
rated 0 times [  63] [ 7]  / answers: 1 / hits: 25255  / 12 Years ago, mon, october 22, 2012, 12:00:00

I'm trying to re-size iframe height after Bootstrap: collapse plugin transition is finished. Click event doesn't work because the transition is not finished yet, JavaScript gets the wrong height information. Any Idea to solve this issue?


More From » jquery

 Answers
12

You need to handle the hidden event on the collapse plugin.



From Docs




hidden - This event is fired when a collapse element has been hidden
from the user (will wait for css transitions to complete).




$('#myCollapsible').on('hidden', function () {
// do something…
})


As pointed by @Francesc in the comment for Bootstrap 3.0 we have to use



$('#myCollapsible').on('hidden.bs.collapse', function () {
// do something…
})

[#82432] Saturday, October 20, 2012, 12 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
joanneamiyaa

Total Points: 532
Total Questions: 127
Total Answers: 98

Location: Guam
Member since Tue, Nov 3, 2020
4 Years ago
;