You’re calling $tiles.imagesLoaded
but $tiles
isn’t defined, nor is the $handler
you use later. Try this:
$(function() {
var tiles = $('#suptiles'),
handler = $('li'),
options = {
autoResize: true,
container: $('#supmain'),
offset: 10,
outerOffset: 15,
fillEmptySpace: true,
itemWidth: 280,
flexibleWidth: 500
};
tiles.imagesLoaded(function() {
handler.wookmark(options);
});
});
The $
is part of the variable name just like any other allowable character: $tiles
and tiles
refer to different variables.
Also, the Wookmark jQuery plugin documentation says this about the container
option:
the width of this element is used to calculate the number of columns, defaults to "window". For example $('myContentGrid'). Container should also have the CSS property "position: relative".
This updated fiddle seems to be working. I added the necessary CSS and removed the , tiles
part of the handler declaration (what was that for?).