Giter Site home page Giter Site logo

Am I missing a step? about masonry-ordered HOT 9 CLOSED

Antonel1 avatar Antonel1 commented on July 16, 2024
Am I missing a step?

from masonry-ordered.

Comments (9)

tasuki avatar tasuki commented on July 16, 2024

Hi, I don't think you're missing a step. The defaults put "upper position" (the masonry way) and "shelf order" (the order you want) with the same weight. You might want to set shelfOrder to a higher number, eg.

$('#container').masonry({
  itemSelector: '.box',
  columnWidth: 240,
  layoutPriorities: {
    shelfOrder: 10
  }
});

Also, see the docs.

If that doesn't help, post your code on jsfiddle and I'll have a look.

from masonry-ordered.

Antonel1 avatar Antonel1 commented on July 16, 2024

I've set the shelfOrder and upperPosition to different numbers, but nothing seems to be moving. I've also changed the column width number but 240 is the only number that gets Masonary to work properly. I have a feeling I'm doing something wrong.

My code is in jsfiddle: http://jsfiddle.net/7gSgh/

The scripts are in a folder titled 'js.' Am I linking them correctly?

Thank you for your help!

from masonry-ordered.

tasuki avatar tasuki commented on July 16, 2024

Well, if the scripts are in a folder titled 'js', perhaps the paths should be:

<script src="/js/jquery.masonry.min.js"></script>
<script src="/js/jquery.masonry.ordered.js"></script>

Have you tried using Firebug or Chrome's DevTools to check the files have loaded and there are no javascript errors?

from masonry-ordered.

Antonel1 avatar Antonel1 commented on July 16, 2024

Hi tasuk. I tried linking the scripts in different ways. I even tried taking the scripts out of the js folder. I'll keep playing around with it. I think I may take Masonary out and reinsert it again to make sure I've put it in correctly. Maybe I'm doing something wrong. I'll let you know how it works out.

from masonry-ordered.

tasuki avatar tasuki commented on July 16, 2024

Learn to use Javascript debugging tools, such as Firebug on Firefox or DevTools on Chromium.

from masonry-ordered.

Antonel1 avatar Antonel1 commented on July 16, 2024

I have been troubleshooting for hours. I made a mockup on http://jsfiddle.net/DqGMT/. Masonry & Masonry Ordered work as expected. Then I inserted the very same scripts in my Wordpress website, and once again it didn't work. I removed style sheets, plugins, other java scripts, Firebuged, anything that could possibly be affecting the scripts, and it still didn't work. Then I realized I was using different browsers for my website and fiddle. So I started testing my fiddle on different browsers.

Masonry & Masonry Ordered work properly on Safari and Chrome, but I don't think they work properly on Firefox. Please see for yourself by loading http://jsfiddle.net/DqGMT/ in different browsers. Am I correct? This could explain why it wasn't working on my website because I was viewing it on Firefox. Would you know of a workaround for Masonry & Masonry Order on Firefox?

from masonry-ordered.

tasuki avatar tasuki commented on July 16, 2024

No idea what's wrong, your jsfiddle actually works perfectly on my side:

masonry-firefox

Different browser version? Cache? OS? Unfortunately could be almost anything...

from masonry-ordered.

Antonel1 avatar Antonel1 commented on July 16, 2024

You're right, it can be almost anything. It works fine on most browsers and systems. I'm just glad my website and your script aren't causing the problem.

JQuery Masonry Ordered works great! Thank you for all your help!

from masonry-ordered.

tasuki avatar tasuki commented on July 16, 2024

You're welcome!

from masonry-ordered.

Related Issues (6)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.