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

  • Home
  • SEARCH
  • 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 8363931
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T12:18:36+00:00 2026-06-09T12:18:36+00:00

I am trying to accomplish something like this var audios = $(‘audio’); for(var i

  • 0

I am trying to accomplish something like this

var audios = $('audio');

for(var i = 0; i< audios.length;i++){
    if(audios[i].currenTime != 0)
        audios[i].pause();
}

But when I use JQuery to do it it returns to me that it doesn’t have any method.

$('audio').each(function(){
    if($(this).curentTime !=  0){
     $(this).pause();
    }
});

Is there anything I am missing?

  • 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-09T12:18:37+00:00Added an answer on June 9, 2026 at 12:18 pm

    When using .each() the callback receives the DOM element as this. You can (and have to) use it directly instead of wrapping it with jQuery again.

    $('audio').each(function() {
        if(this.currentTime != 0) {
            this.pause();
        }
    });
    
    • When you want to access the element, use this
    • When you want to call jQuery functions on the element, use $(this)
    • Never use $(this)[0], that’s like ['Hello'][0] instead of 'Hello'
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to accomplish something like this query: var query = from a
I'm trying to accomplish something like this, var data = from p in db.Projects
I am trying to accomplish something like this: thread t; // create/initialize thread t.launch();
I am trying to accomplish something like this. /* Code start */ function getCurrentTime()
Im trying to accomplish something like this. I want to add the text stored
I am trying to accomplish something like this: I am creating a simple blog.
I'm trying to accomplish something like this with CSS3: Where the purple circle is
I'm trying to accomplish something like this Where the buttons are centered in the
I'm trying to accomplish something like this: <DataTemplate.Triggers> <EventTrigger RoutedEvent={Binding MyEvent}> <BeginStoryboard Storyboard={StaticResource MyAnimation}
Im trying to accomplish something which may seem a bit convoluted but would be

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.