Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ReferenceError: imagesLoaded is not defined #39

Open
iamjinme opened this issue Jul 5, 2016 · 4 comments
Open

ReferenceError: imagesLoaded is not defined #39

iamjinme opened this issue Jul 5, 2016 · 4 comments

Comments

@iamjinme
Copy link

iamjinme commented Jul 5, 2016

I try, but received this error on console. My code is:

<div class="grid">
<div masonry='{ "transitionDuration" : "0.4s" , "itemSelector" : ".tile", "columnWidth" : 160 }'>
  <div class="grid-item" masonry-tile ng-repeat="item in items">
    <img ng-src="{{ item.src }}" class="img-responsive" onerror="this.src='/public/img/404.jpg'"/>

Any idea?

@iamjinme
Copy link
Author

iamjinme commented Jul 5, 2016

Update: I add ImagesLoad library to index.html

<script src="https://npmcdn.com/[email protected]/imagesloaded.pkgd.js"></script>

Now the error is: TypeError: elem.get is not a function
On line 58:

imagesLoaded( elem.get(0), update);

What is the problem? Please.

@iamjinme
Copy link
Author

iamjinme commented Jul 5, 2016

I solve the problem. Replace "elem.get(0)" with "elem.eq(0)".

@jingzhou123
Copy link

elem.get is a jQuery method not angular jqLite method

@MrSpark2591
Copy link

MrSpark2591 commented Oct 20, 2016

<script src="https://npmcdn.com/[email protected]/imagesloaded.pkgd.js"></script>

try including this one if you are using jquery..:)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants