Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>According to <a href="https://github.com/luis-almeida/jPages/blob/master/js/jPages.js" rel="nofollow">jPages</a> source file this happens because at <em>second</em> plugin initialization plugin can't find <code>:visible</code> elements as they are hidden by <em>first</em> plugin initialization <sup>(line 60)</sup>:</p> <pre><code>this._items = this._container.children(":visible"); </code></pre> <p>To load your shop module with <code>jPages</code> plugin you need to initialize that plugin after shop items are shown. To do this you need to modify <code>callback</code> value in <code>initiate_cluster</code> function:</p> <p>Lets say that <em>Shop</em> page index is <code>4</code>:</p> <pre><code>Cluster.prototype.initiate_cluster = function(plugin_navigation, plugin_options) { // ... your code plugin_options.callback = function( pages ) { if( pages.current == 4 ) { this.inititate_shop(); } }; this.initiate_plugin(plugin_navigation, plugin_options); }; </code></pre> <p>And remove <code>this.inititate_shop();</code> function call from <code>Cluster</code> class constructor.</p> <p>This should work.</p> <p>Or you can try to swap plugin calls, but I'm not sure:</p> <pre><code>// first we initiate shop this.inititate_shop(); // then main site navigation this.initiate_cluster(self.plugin_navigation_class, { containerID : self.plugin_wrapper_id, startPage : +(self.get_local_storage_data(self.data_key) || 1), callback : function(pages){ self.set_local_storage_data(self.data_key, pages.current); } }); </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload