Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8451059
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T11:08:07+00:00 2026-06-10T11:08:07+00:00

My queue.html looks like <div class=queue> <div class=player_controls> <button id=previous class=btn btn-large navigator-button navigator-icons>

  • 0

My queue.html looks like

<div class="queue">
    <div class="player_controls">
        <button id="previous" class="btn btn-large navigator-button navigator-icons">
            <i class="icon-backward icon-large"></i>
        </button>
        <button id="play" class="btn btn-large navigator-button navigator-icons">
            <i class="icon-play icon-large"></i>
        </button>
        <button id="next" class="btn btn-large navigator-button navigator-icons">
            <i class="icon-forward icon-large"></i>
        </button>
        <button id="shuffle" class="btn btn-large navigator-button navigator-icons">
            <i class="icon-random icon-large"></i>
        </button>
    </div>

    <div class="queue_list">
        <!--p>your localStorage data will be displayed here</p-->
        <div class="queue_item hide-item">
            <img class="thumbnail" />
            <p class="title"></p>
        </div>
    </div>
</div>

and my jQuery function looks like

$(function(){
    $('#queue').click(function(){
        $("#feature").load("templates/queue.html");
        var template = $('.queue_item').clone();
        if (localStorage['queue'] != null ) {
            $('.queue_list').append('<p>You have not added any video to the queue yet</p>');
        } else {
            var queue_list = JSON.parse(localStorage['queue']);
            for (var i = 0; i < queue_list.length; i++) {
                console.log(queue_list[i]);
            }
        }
    });

    $('body').on('click', '#play', function(){
        bootstrap_alert.success('will play video now');
    });

    $('body').on('click', '#previous', function(){
        bootstrap_alert.success('will play previous video now');
    });

    $('body').on('click', '#next', function(){
        bootstrap_alert.success('will play next video now');
    });

    $('body').on('click', '#shuffle', function(){
        bootstrap_alert.success('will shuffle videos now');
    });
});

the CSS looks like

.hide-item {
    display: none;
}

.view-item {
    display: block;
    height: 120px;
    margin-left: 1%;
}

As soon as I click on Queue button, the above jQuery function fires up and it displays html as You have not added any video to the queue yet and disappears quickly.

Why doesn’t it stays on the page?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T11:08:09+00:00Added an answer on June 10, 2026 at 11:08 am

    I’ll take a wild guess and say you are appending to a .queue_list element that is replaced with the load() function.

    Try doing the appending in the callback when the new content is loaded :

    $('#queue').click(function() {
        $("#feature").load("templates/queue.html", function() { //callback
            var template = $('.queue_item').clone();
            if (localStorage['queue'] != null) {
                $('.queue_list').append('<p>You have not added any video to the queue yet</p>');
            } else {
                var queue_list = JSON.parse(localStorage['queue']);
                for (var i = 0; i < queue_list.length; i++) {
                    console.log(queue_list[i]);
                }
            }
        });
    
    });​
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have created a drop-down-menu, the html for the drop-down part basically looks like
I would like to extend the Queue.PriorityQueue described here: http://docs.python.org/library/queue.html#Queue.PriorityQueue The queue will hold
How to clean jms queue from spring jms? Like clean command from MQ Explorer?
I have a request queue and a response queue. I would like to take
I have a QueueProcessor class that processes a work queue. I want to send
I have an HTML file that has a set of divs with the class
I'm using Zend_Queue to queue and send out emails (http://framework.zend.com/manual/en/zend.queue.adapters.html) Is there a way
In the following blogpost: http://www.justsoftwaresolutions.co.uk/threading/implementing-a-thread-safe-queue-using-condition-variables.html There is a 'push' method defined as follows: void
According to the documentation found in http://ask.github.com/celery/userguide/routing.html#manual-routing i can pass a queue parameter to
I have tried to create a concurrent queue class, in a producer-consumer pattern. I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.