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

new TB #1

Closed
supermensa opened this issue Jun 27, 2013 · 6 comments
Closed

new TB #1

supermensa opened this issue Jun 27, 2013 · 6 comments

Comments

@supermensa
Copy link

Nice class!

I fixed some minor errors like new TB -> _Tumblr and missing comma after targetPost: '#content' to get your script up and running.

var myTumblr = new _Tumblr({ url : 'http://overflowhidden.tumblr.com', limitPostInJSON : 40, sessionStorage : true, postSelector : '.post', privateBlog: { activate : false, password : '' }, infiniteScroll: { activate : true, nearBottom : 200, targetPost : '#content', appendMethod : 'normal' } });

This above works, myTumblr is instantiated but I keep getting an error when pushing content to the DOM with myTumblr.getFirstPushHome('#grid-home');

  • the ajax request fails (line 574).

Would you be kind to provide a full example with HTML and infiniteScroll?

@yoriiis
Copy link
Owner

yoriiis commented Jul 1, 2013

Thanks !

I fixed the readme.

About your problem, have you create the html tag "grid-home" (Your can pass ID or Class in the method) ?

<div id="grid-home"></div>

@supermensa
Copy link
Author

Yes, the tag is there, but _Tumblr.prototype.getPostOfPage only fails on the ajax request when it is used by getFirstPushHome. The request itself seems unnecessary as the posts are already available myTumblr.data.posts.

If you could provide a demo with your exact steps, it would help me debug.

@yoriiis
Copy link
Owner

yoriiis commented Jul 1, 2013

Ok it's strange, have you an url to look the problem ?

@supermensa
Copy link
Author

test url - try running myTumblr.getFirstPushHome('#grid-home'); in the console

@yoriiis
Copy link
Owner

yoriiis commented Jul 1, 2013

You have instanciate the class with targetPost : #content' and url : 'http://overflowhidden.tumblr.com' and you have not your post in the html tag #content.
You work in two Tumblr or http://pandemicicecream.tumblr.com/ it's just the test ? Because add script in head is bad for performance.

@yoriiis yoriiis closed this as completed Jul 1, 2013
@supermensa
Copy link
Author

Thanks, a bit to quick on testing, missed the targetPost.

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

2 participants