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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T11:11:20+00:00 2026-06-17T11:11:20+00:00

I have a javascript file that needs to count how many classes (.wrapper) there

  • 0

I have a javascript file that needs to count how many classes (.wrapper) there are in a external html page.

So far i have been using this for a count (it was previously all on the same page).

var adCount = $('.wrapper').size();
alert(adCount);

But i can’t seem to find anything that would allow me to run this statement on a different page than the code is runing on. I was hoping to add something like this.

var adCount = $('js/sliderExternal.html .wrapper').size();
alert(adCount);    

They are in the same directory but I’m keeping the pages seperate as the external page needs to be updated constantly and i don’t want it in the middle of a page of code. (This page may be updated by people who don’t code at all). Anyway, any help on this would be much appreciated.

If you need any more information ask away!

Thanks.

  • 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-17T11:11:21+00:00Added an answer on June 17, 2026 at 11:11 am

    This should work:

    $.get('js/sliderExternal.html', function(data){
      $(data).find('.wrapper').size();
    })
    

    Also see API Doc for $.get().

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

Sidebar

Related Questions

I have a HTML that includes a Javascript file. This script contains a special
I have a javascript link that references another .js file. I've been trying to
I have an ASP.NET MVC website which has a particular javascript file that needs
I have code below of an HTML page that includes a JS file. Function
I have a php script that generates php and javascript wrapper classes that handle
I have some code in a javascript file that needs to send queries back
I have a JavaScript file that prints the title attribute of the child img
I have a JavaScript file that I ran through the Google Closure compiler, and
I have a lengthy JavaScript file that passes JSLint except for used before it
I have a simple JavaScript file that has three jQuery $document.ready functions. All three

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.