Cosmonaut.2019-04-02 15:16:04
Cosmonaut., 2019-04-02 15:16:04

After installing isopote filter, the site is not displayed correctly, what's the problem?

Hello kind people.
Installed the Isotope filter, as soon as you go to the category that is used by the isotope filter, the blocks are not displayed correctly, and if you refresh the page or go to other categories, for example, "interiors", the problem disappears.


Answer the question

In order to leave comments, you need to log in

3 answer(s)
Alexander Sharomet, 2019-04-03

Most likely your pictures won't load in time.
Try wrapping all your code in:

$( window ).load(function() {
  // init Isotope
  var $pgrid = $('.pgrid').isotope({
      itemSelector: '.element-item',
      layoutMode: 'fitRows'

Daniil Demidko, 2017-01-19

There are two manifestations of polymorphism - overloading and overriding. I believe you have already encountered the first one. Here is an example of an override in C++:

#include <iostream>
#include <memory>
using namespace std;

struct Base {
    virtual void Action() = 0;

struct A: public Base {
    virtual void Action() override {  cout<< 'A'; }

struct B: public Base {
    virtual void Action() override {  cout<< 'B'; }

int main() {
    // Используем общий интерфейс для разных наследников

    unique_ptr<Base> ptr = make_unique<A>();
    ptr->Action(); // A

    ptr = make_unique<B>();
    ptr->Action(); // B

alexchin, 2017-01-22

1. There are two different objects. If they are derived from one class, then at the level of this class they can execute all inherited methods (should), which means these objects are polymorphic. Those it will be convenient for us to work with abstract objects without going into implementation details. This is what is described in the article .
2. The same can be done by declaring support for the same interfaces for these objects, as described in Lev K 's question .
2 is certainly valid, but 1 is easier.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question