Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Uncaught TypeError: Cannot read property 'LayoutMode' of undefined

HI i am making my project using Isotope.js where i have to show my tiles in the horizontal manner, So i am following code

var winDow = $(window);
    // Needed variables
    var $container=$('.portfolio-box, .blog-box');
    var $filter=$('.filter');

    try{
        $container.imagesLoaded( function(){
            $container.show();
            $container.isotope({
                layoutMode: 'masonryHorizontal',
                masonryHorizontal: {
                    rowHeight: 50
                },

            });
        });
    } catch(err) {
    }

but unluckily it is not working , error on the console is

1.    Uncaught TypeError: Cannot read property 'LayoutMode' of undefined
2.    Uncaught TypeError: undefined is not a function

Help is appreciable must

like image 480
Jot Dhaliwal Avatar asked May 20 '14 11:05

Jot Dhaliwal


1 Answers

You're not including the isotope plugin on your page.

You need to include both isotope.pkgd.min.js and masonry-horizontal.js


This is grabbed from your site. If you uncomment that line, you should be good.

<!--<script type="text/javascript" src="js/jquery.isotope.min.js"></script>-->
like image 113
cowcowmoomoo Avatar answered Sep 19 '22 03:09

cowcowmoomoo