Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <ul>
- <li>
- <div class="gmt-select">
- <select id="song-gmt-selector" class="tooltip" title="Toggle track
- info">
- <option value="genres" title="Show Track
- Genres">Genre</option>
- <option value="moods" title="Show Track Moods">Mood</option>
- <option value="themes" title="Show Track
- Themes">Theme</option>
- <option value="instruments" title="Show Track
- Instruments">Instru</option>
- <option value="info" title="Show Track
- Description">Desc</option>
- </select>
- </div>
- </li>
- </ul>
- <div class="box genres_s"></div>
- <div class="box moods_s"></div>
- <div class="box desc_s"></div>
- $(document).ready(function () {
- var current = '';
- $('#song-gmt-selector').on('change', function () {
- current = $(this).val();
- console.log(current);
- $('.box').removeClass('show-gmt');
- $('.' + current + '_s').addClass('show-gmt');
- localStorage.setItem('current', current);
- });
- if (localStorage.getItem('current')) {
- $('#song-gmt-selector').val(localStorage.getItem('current'));
- $('.' + localStorage.getItem('current') + '_s').addClass('show-
- gmt');
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement