Note that there are some explanatory texts on larger screens.

plurals
  1. POSpotify apps tabs - update cache
    text
    copied!<p>I'm trying to display a div inside tab playlists if the href contains a spotifyURI. This will be used to display a playlist under a tab. </p> <p>Step by step this is my problem:</p> <ol> <li>Click playlist tab and then click the "My playlist1".</li> <li>The href is displayed in the playlist container under the tab playlists. (perfect so far)</li> <li>Click the start tab and then click the playlists tab.</li> <li>Instead of displaying the list of playlists the playlist container is show again. So the last used url is cached?</li> <li>Then if the playlists tab is clicked again the url will be "reseted" and the list of playlists will be shown and playlist container hidden.</li> </ol> <p>I'd like 4. to show the playlist list right away instead. Is there a way to reset or what am I missing?</p> <pre><code>&lt;script&gt; $(document).ready(function() { sp = getSpotifyApi(1); var m = sp.require("sp://import/scripts/api/models"); updateTabs(); m.application.observe(m.EVENT.ARGUMENTSCHANGED, updateTabs); function updateTabs() { console.log(m.application.arguments); var args = m.application.arguments; $('.section').hide(); if (args[1] == "spotify") $("#playlist").html("args:"+args).show(); else $("#"+args[0]).show(); } }); &lt;/script&gt; &lt;div id="playlist" class="section"&gt;Container for playlist content&lt;/div&gt; &lt;div id="start" class="section"&gt;Welcome&lt;/div&gt; &lt;div id="playlists" class="section"&gt; My &lt;a href="spotify:app:tabtest:playlists:spotify:user:_username_:playlist_uri1"&gt;playlist1&lt;/a&gt; My &lt;a href="spotify:app:tabtest:playlists:spotify:user:_username_:playlist_uri2"&gt;playlist2&lt;/a&gt; &lt;/div&gt; </code></pre> <p>Thanks alot for all replys!</p>
 

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