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 1073613
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T21:00:51+00:00 2026-05-16T21:00:51+00:00

Problem : I want to do a .get() but only with the elements without

  • 0

Problem: I want to do a .get() but only with the elements without the .played class. (I’m building a shuffle playlist, played numbers are being marked by a .played class on their div).

Current code:

var randomElements = $("#playlistVideos").get();

What I tried: the filter() and a lot of selector tricks, none of them succeed. I’m very interested in how you will solve a problem like this!

HTML:

<div id="playlistVideos">
<div class="vt ddsitem">
    <a href="javascript:loadAndPlayVideo('wQ5iFQv1KaE')"><img class="pt" id="wQ5iFQv1KaE" src="http://i.ytimg.com/vi/wQ5iFQv1KaE/default.jpg"></a>
    <div>
        <img style="width: 18px; height: 18px; position: relative; left: 100px; bottom: 98px;" class="updown" src="images/updown.gif"><a style="cursor: pointer;" href="javascript:deleteVideo('wQ5iFQv1KaE')"><img style="width: 18px; height: 18px; position: relative; left: 150px; bottom: 98px; cursor: pointer;" class="bin" src="images/bin.gif"></a>
    </div>
</div>
<div class="vt ddsitem">
    <a href="javascript:loadAndPlayVideo('Ya3_wQpzDIU')"><img class="pt" id="Ya3_wQpzDIU" src="http://i.ytimg.com/vi/Ya3_wQpzDIU/default.jpg"></a>
    <div>
        <img style="width: 18px; height: 18px; position: relative; left: 100px; bottom: 98px;" class="updown" src="images/updown.gif"><a style="cursor: pointer;" href="javascript:deleteVideo('Ya3_wQpzDIU')"><img style="width: 18px; height: 18px; position: relative; left: 150px; bottom: 98px; cursor: pointer;" class="bin" src="images/bin.gif"></a>
    </div>
</div>
<div class="vt ddsitem played">
    <a href="javascript:loadAndPlayVideo('Dq0hrmT7JiQ')"><img class="pt" id="Dq0hrmT7JiQ" src="http://i.ytimg.com/vi/Dq0hrmT7JiQ/default.jpg"></a>
    <div>
        <img style="width: 18px; height: 18px; position: relative; left: 100px; bottom: 98px;" class="updown" src="images/updown.gif"><a style="cursor: pointer;" href="javascript:deleteVideo('Dq0hrmT7JiQ')"><img style="width: 18px; height: 18px; position: relative; left: 150px; bottom: 98px; cursor: pointer;" class="bin" src="images/bin.gif"></a>
    </div>
</div>
<div class="vt ddsitem">
    <a href="javascript:loadAndPlayVideo('WklNzfvit9E')"><img class="pt" id="WklNzfvit9E" src="http://i.ytimg.com/vi/WklNzfvit9E/default.jpg"></a>
    <div>
        <img style="width: 18px; height: 18px; position: relative; left: 100px; bottom: 98px;" class="updown" src="images/updown.gif"><a style="cursor: pointer;" href="javascript:deleteVideo('WklNzfvit9E')"><img style="width: 18px; height: 18px; position: relative; left: 150px; bottom: 98px; cursor: pointer;" class="bin" src="images/bin.gif"></a>
    </div>
</div>

  • 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-05-16T21:00:52+00:00Added an answer on May 16, 2026 at 9:00 pm

    As others have mentioned, you can use the :not() selector. You can also use the .not() method which works in a similar way to .filter() except that it narrows down to elements that don’t match the selector.

    // Using :not()
    var randomElements = $('#playlistVideos .vt:not(.played)').get();
    
    // Using .not()
    var randomElements = $('#playlistVideos .vt').not('.played').get();
    

    Here is an example from jQuery.com for .not(): http://jsfiddle.net/JVNVL/.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to get data using CURL but I have a problem. When I
i have a problem. i want to get info about my string have other
I have one problem , I want to get some data from XML file
This seems to be a recurring problem to me. I want to get started
Problem: I want to get all locations from a database and encase them all
I need to get the content of some specific elements using jquery, the problem
I want to limit the number of child elements I get back. In this
Problem I want to use the interactive debugger with IntelliJ. Unfortunately, I can't convince
Problem: I want to add headers in the middle of a gridview databind. I
Problem: I want to list n number of games from each genre (order not

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.