0

I have a page with some tiles laid out using the jQuery Masonry plugin. However i get an error in FF 4 and below:

$("#flextiles").masonry is not a function

I am tearing my hair out as to why it is not working, it works in every other browser - even IE6!!!

Here is the page

Anyone got any ideas?

Relevant code to load masonry plugin and init is:

function buildGrid() {
    $('#flextiles').masonry({
        itemSelector: 'li',
        columnWidth: 235
    });
}

$.getScript("http://bhuk.stage.arcadiagroup.ltd.uk/wcsstore/ConsumerDirectStorefrontAssetStore/images/colors/color35/cms/templates/static/template-0000008049/js/masonry.min.js", function() {
    buildGrid();
});
El Guapo
  • 567
  • 2
  • 13
  • 26
  • Can you include the relevant code - I'd start with the lines where you include jQuery and the plugins, as well as the code that throws the error - in the question, please? – Anthony Grist Jun 12 '12 at 15:34
  • I don't have ff3.6, but have you tried to run the demos on ff3.6? http://masonry.desandro.com/demos/basic-single-column.html – davehale23 Jun 12 '12 at 15:36
  • Yes the demos seem to work in FF 3.6 for me. I think it is something to do with the fact that i am fetching the masonry plugin with ajax then initialising rather than calling masonry on page load. – El Guapo Jun 12 '12 at 16:20

2 Answers2

0

I really wouldn't worry at all about FF 4! It's on version 12 these days. I'm a fan of Masonry myself, it's a nice plugin, but if it wasn't working on FF4 it really wouldn't bother me at all.

Check the stats!

onkar
  • 4,427
  • 10
  • 52
  • 89
ConorLuddy
  • 2,217
  • 2
  • 19
  • 18
  • sorry the question is not related our attitudes toward using FF3.6. – Ram Jun 12 '12 at 15:27
  • Ok sorry, I work on websites for major retailers and nobody cares about FF4. I guess there's occasions when people do. You could try Isotope instead and see if that works in FF4. Good luck! http://isotope.metafizzy.co/ – ConorLuddy Jun 12 '12 at 15:35
  • i agree with you, now FF4 is an old browser. – Ram Jun 12 '12 at 15:38
  • I am well aware that FF 3.6/4 is ancient history, and if it were up to me i wouldn't have to worry about it, but this is the browser the client has installed and they are being fussy so and so's. Any help would be appreciated. – El Guapo Jun 12 '12 at 15:39
  • Ah I hate that. Sorry about that! I would suggest charging them more for the extra time required to develop for such an old browser, or defining your supported browsers in the contract. Have been in that situation before. Hope you sort it out :) – ConorLuddy Jun 12 '12 at 15:48
  • Well i say client, it is actually another department of the company but they are effectively our clients. I wish i could just tell them to forget about FF 3.6 but they are stubborn fools and refuse to listen to sage advice. – El Guapo Jun 12 '12 at 16:13
0

Fwiw I just installed FF 3.6 on a VM running XP and loaded your link. It works fine and I get no JS errors. The stuff below the fold looks Masonified.

How many machines have you tried this on? There could be something on a particular machine that is hosing this ( an add-on or spyware ) I suggest that you try to disable all "extensions" and try again.

davehale23
  • 4,374
  • 2
  • 27
  • 40