I am trying to implement Justified-Gallery: http://miromannino.github.io/Justified-Gallery/ in my Drupal 7 website.

I linked justifiedGallery.min.css and jquery.justifiedGallery.min.js.

The thumbs are generated with Node Gallery module.

In my script.js I call

Drupal.behaviors.my_custom_behavior = {
  attach: function(context, settings) {

but on the page only the loading animation shows, the divs holding the thumbs remain with opacity:0 and are not arranged in grid... Interestingly all elements are assigned the respective styles by the script, so I think the script is not kicking-in properly.

I also tried putting


but again no luck...

Both codes are wrapped in the

(function ($, Drupal, window, document, undefined) {
})(jQuery, Drupal, this, this.document);

What am I doing wrong? Any help appreciated.

  • Is it throwing any error? – Malabya Tewari Jun 15 '15 at 10:56
  • Hi, nope, no error, just the loading animation shows and no further action. As if its stuck there. – user48533 Jun 15 '15 at 11:04
  • That's weird. Are you talking about an error in the browser or in the console tab of the developer tool? – Malabya Tewari Jun 15 '15 at 11:06
  • in the console tab... – user48533 Jun 15 '15 at 11:09
  • In your last code line, you open { but never close it. If that's really the case, and you see no error in JS console, you should use another browser - because it is an error and should fail pretty loudly. – Mołot Jun 15 '15 at 11:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy