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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T01:19:44+00:00 2026-06-10T01:19:44+00:00

Hello and thanks for your help. I have a php script on my website

  • 0

Hello and thanks for your help.

I have a php script on my website that returns my last few tweets in form of an unordered list with the posts each being a list item.

<div id="latesttweet">
  <ul>
    <li>
      This is a tweet<br />
      <span>3 hours ago.</span>
    </li>
    <li>
      This is another tweet<br />
      <span>4 hours ago.</span>
    </li>
  </ul>
</div>

I tried to hide some of them dynamically using JavaScript, but for some reason once I collect all the list items in an Array, I can’t address them properly anymore. When I alert the length of the Array however, I get the right number.
jQuery seems to be working alright in general.

var activeTweet = 0;
var tweet_ul = document.getElementById('latesttweet');
var tweetArray = tweet_ul.getElementsByTagName('li');

var tweetCount = tweetArray.length;
alert(tweetCount); //returns the right result

tweetArray[1].hide();

This way, one should expect that the second list item would have display set to none, but still both items remain visible.

What am I doing wrong?

  • 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-10T01:19:46+00:00Added an answer on June 10, 2026 at 1:19 am

    Basically you are not using jQuery

    $(tweetArray[1]).hide()
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hello and thanks in advance for your help. I have a treeview that is
Hello and thanks for your help. I have a window with a stackpanel named
Hello i have the this problem, i need your help to figure out what
I have this kinda template text : Hello {#Name#}, Thanks for coming blah on
Hello and thanks in advance for the communal help I always find here. I
So, I have page where a PHP script echoes out all of my HTML
My index.php switch ($action){ case calendar: echo <script language=\javascript\>\n; echo document.write('Hello World!'); echo </script>;
need help transforming the following string Hello I have blanks to the left into
Hello I try to align all my input to have a normal form! I
Hello Coders, I have a dynamically created table in PHP and for each row

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.