Quantcast
Channel: WordPress.org Forums » All Posts
Viewing all articles
Browse latest Browse all 119578

lrrm on "[Plugin: Infinite-Scroll] need help to set up infinite_scroll"

$
0
0

Hi,

I've already checked Google and this forum on this topic but I'm stuck.
Everytime I'm loading the blog with FF (latest) I get this javascript error:

Error: ReferenceError: infinite_scroll is not defined
Source File: http://localhost/blog/
Line: 176

Let me provide you with some additional information:

In Line 176 we find the following statement:
// Because the wp_localize_script method makes everything a string
infinite_scroll = jQuery.parseJSON(infinite_scroll);

I'm using this theme, which works fine for me:
http://wordpress.org/extend/themes/minimalism

What I already did:
• I've downloaded and installed the plugin
• I've activated it
• modified the header.php to load jquery 1.9.1 and jquery.infinitescroll.min.js (latest from github)
• I've modfied the functions.php according to this posting
http://wptheming.com/2012/03/infinite-scroll-to-wordpress-theme/
to add it manually to the theme
• according to this thread I've modified line 30x to return true
http://wordpress.org/support/topic/infinite-scroll-js-error-uncaught-error-infinite_scroll-is-not-defined?replies=15

The other HTML/JS code looks like this:
<script type="text/javascript">
// Because the wp_localize_script method makes everything a string
infinite_scroll = jQuery.parseJSON(infinite_scroll);

jQuery( infinite_scroll.contentSelector ).infinitescroll( infinite_scroll, function(newElements, data, url) { eval(infinite_scroll.callback); });
</script>
<script>
var infinite_scroll = {
loading: {
img: "http://localhost/blog/wp-content/themes/minimalism/images/ajax-loader.gif",
msgText: "Loading the next set of posts...",
finishedMsg: "All posts loaded."
},
"nextSelector":"#nav-below .nav-previous a",
"navSelector":"#nav-below",
"itemSelector":"article",
"contentSelector":"#content"
};
jQuery( infinite_scroll.contentSelector ).infinitescroll( infinite_scroll );
</script>
<!--stats_footer_test--> <script type="text/javascript">
(function() {
var request, b = document.body, c = 'className', cs = 'customize-support', rcs = new RegExp('(^|\\s+)(no-)?'+cs+'(\\s+|$)');

request = true;

b[c] = b[c].replace( rcs, ' ' );
b[c] += ( window.postMessage && request ? ' ' : ' no-' ) + cs;
}());
</script>

For me it looks like the JSON object is broken or something.

Please help me. I' stuck with this.
Thanks.

lrrm

http://wordpress.org/extend/plugins/infinite-scroll/


Viewing all articles
Browse latest Browse all 119578

Trending Articles