Note that there are some explanatory texts on larger screens.

plurals
  1. POCustom Attribute for the attribute that can browse through multiple pages (JQuery & HTML)
    primarykey
    data
    text
    <p>I created a menu which browses through a list of slide on a specific page.</p> <p>The HTML Code for it is as follows:-</p> <pre><code> &lt;ul class="dropdown"&gt; &lt;li class="orange"&gt;&lt;a href="#" data-jumpslide="2"&gt;&lt;div class="list-item one-liner"&gt;&lt;div class="left"&gt;&lt;span id="functionality-icon"&gt;&lt;/span&gt;&lt;/div&gt; &lt;div class="right"&gt;When to do it&lt;/div&gt;&lt;div class="clear"&gt;&lt;/div&gt;&lt;/div&gt;&lt;/a&gt;&lt;/li&gt; &lt;li class="orange"&gt;&lt;a href="#" data-jumpslide="3" &gt;&lt;div class="list-item one-liner"&gt;&lt;div class="left"&gt;&lt;span id="functionality-icon"&gt;&lt;/span&gt;&lt;/div&gt; &lt;div class="right"&gt;Key faces&lt;/div&gt;&lt;div class="clear"&gt;&lt;/div&gt;&lt;/div&gt;&lt;/a&gt;&lt;/li&gt; &lt;li class="orange"&gt;&lt;a href="#" data-jumpslide="5" &gt;&lt;div class="list-item one-liner"&gt;&lt;div class="left"&gt;&lt;span id="functionality-icon"&gt;&lt;/span&gt;&lt;/div&gt; &lt;div class="right"&gt;Functionalities&lt;/div&gt;&lt;div class="clear"&gt;&lt;/div&gt;&lt;/div&gt;&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt; </code></pre> <p>Notice the "custom attribute" for the tag, which tells me which slide to browse to.</p> <p>This JS code allows me to do that:-</p> <pre><code>$('a[data-jumpslide]').each(function(idx, ele){ $(ele).on('click', function(){ var slideToJump = $(this).data('jumpslide'); window.slider.go(false, slideToJump+1); }); }); </code></pre> <p>As you can see that it gets the number of the slide on the page and just jumps on it.</p> <p>The slides are all on the same page, so basically this code move slides on the same page and takes me whichever slide I wanna go. My problem is now that I've been trying to move slides on another page now. </p> <p>So if I click a link to move to a different page with a specific slide number, how would I able to do that?</p> <p>Thanks.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

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