Open feng9017 opened 7 years ago
Hi,
try running refreshWookmark
in the next rendered frame. Either with setTimeout
or requestAnimationFrame
.
That could perhaps help.
Or you can maybe also hide and show your other elements with css instead of jQuery, as jQuery changes more than only the opacity during the animation.
Thank the author for contributing this plugin! I appreciate it that the author make so much effort to this little and helpful one! I like it ! I am dealing a bug .
When the 'element' has class 'collapsed', click it. $('#searchTable').trigger('refreshWookmark') ;" works normally. But when the 'element' has html 'unfold', click it. $('#searchTable').trigger('refreshWookmark') ;" does not work.
I check the code careful . Finally find that the element's attribute "data-wookmark-height" doesn't change when I click it which hasn't class "collapsed". But it's strange that the element's attribute "data-wookmark-height" changes when I click it which has class "collapsed". I don't have enough time to check the source code. I guess the attribute "data-wookmark-height" is relevant to "refreshWookmark" working or not. At last I realize that the functions "fadeIn" and "fadeOut" working needs some time. This may cause "refreshWookmark" couldn't detect the change to the item. So I change "fadeIn" and "fadeOut" to "show" and "hide". It works finally. But this cannot answer Why "refreshWookmark" when the element has function "fadeIn" works normally. I expect that the author or others could make some response to me! It cannot be better any more that if our author make change in the next version.