Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

jQuery Isotope RTL

I'm using this code to run Isotope with RTL support

$.Isotope.prototype._positionAbs = function( x, y ) {
  return { right: x, top: y };
};

$('.portfolio-isotope').each(function() {
    var layoutMode = $(this).attr('data-layoutmode');
    if(!layoutMode || layoutMode === ""){
        layoutMode = 'fitRows';
    }

    $(this).isotope({
        transformsEnabled: false,
        itemSelector: '.portfolio-element',
        layoutMode : layoutMode,
        transitionDuration : '0.8s'
    });

});

For some reason I'm getting the browser returns JavaScript error

Uncaught TypeError: Cannot read property 'prototype' of undefined

What might be the reason for that ?

like image 667
lior r Avatar asked Jun 17 '14 09:06

lior r


People also ask

What is isotope jQuery?

Isotope is a Magical Dynamic Layout Plugin features Layout modes(Intelligent, dynamic layouts that can't be achieved with CSS alone.), Filtering (Hide and reveal item elements easily with jQuery selectors) and Sorting (Re-order item elements with sorting. Sorting data can be extracted from just about anything).

What is isotope filter?

Isotope can hide and show item elements with the filter option. Items that match that filter will be shown. Items that do not match will be hidden.


1 Answers

Controls the horizontal flow of the layout. By default, item elements start positioning at the left, with originLeft: true. Set originLeft: false for right-to-left layouts.

originLeft: false

isotope options

like image 139
Sabry Suleiman Avatar answered Oct 11 '22 15:10

Sabry Suleiman