admin管理员组文章数量:1320614
I ran into a problem with Foundation equalizer, I am trying to dynamically readjust div heights with equalizer after I change content with ajax. I searched Foundation documentation, Stack overflow but I found no answer to this problem.
I noticed that it readjusts when I resize the browser, so it is possible, I just want to find out how to trigger it. (I obviously don't want to tell visitors to resize the browser every time they click a link)
edit: This seems to work, but is that the best solution?
$("#media").click(function(){
$.ajax({
url: "mediaproduction.html"
})
.done(function( html ) {
$( "#main-content" ).html( html );
$(document).foundation();
});
});
I ran into a problem with Foundation equalizer, I am trying to dynamically readjust div heights with equalizer after I change content with ajax. I searched Foundation documentation, Stack overflow but I found no answer to this problem.
I noticed that it readjusts when I resize the browser, so it is possible, I just want to find out how to trigger it. (I obviously don't want to tell visitors to resize the browser every time they click a link)
edit: This seems to work, but is that the best solution?
$("#media").click(function(){
$.ajax({
url: "mediaproduction.html"
})
.done(function( html ) {
$( "#main-content" ).html( html );
$(document).foundation();
});
});
Share
Improve this question
edited Nov 19, 2014 at 17:03
Geronimo Palacios
asked Nov 19, 2014 at 16:23
Geronimo PalaciosGeronimo Palacios
211 silver badge3 bronze badges
2 Answers
Reset to default 6For Foundation 6 :
Foundation.reInit('equalizer');
More info in the doc : http://foundation.zurb./sites/docs/javascript.html#adding-plugins-after-page-load
This is what we use on our site to do what you are talking about:
$(document).foundation('equalizer','reflow');
本文标签: javascriptZurb foundation equalizer resize after ajaxStack Overflow
版权声明:本文标题:javascript - Zurb foundation equalizer resize after ajax - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742071821a2419171.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论