Reputation: 11
I have a problem using the freewall.js library in my ASP.net website. When i refresh(F5) the page the freewall is not working and my images are just aligned in a list under each other, but when i refresh with clearing cache(Ctrl+F5) or navigate to the page for the first time the freewall works.
my freewall code is in a seperate js file:
$(function () {
var wall = new Freewall("#freewall");
wall.reset({
selector: '.brick',
animate: true,
cellW: 400,
cellH: 'auto',
onResize: function () {
wall.fitWidth();
}
});
var images = wall.container.find('.brick');
images.find('img').on('load',
function () {
console.log("hello");
wall.fitWidth();
$(window).resize();
});
});
Does anybody have an idea why it only works when accessing the page without cache?
Upvotes: 1
Views: 115