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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T06:24:07+00:00 2026-05-26T06:24:07+00:00

I am working on little project to learn jQuery, and I have a twitter

  • 0

I am working on little project to learn jQuery, and I have a twitter plugin which you enter a username to see the tweets of that user. Elsewhere on the site I have a simple text input field which I’m hoping can take an entry and append it to where the username is in the existing code… Is this possible? Maybe using the append string, or .text?

Where you can see rjames83, that’s what I’d like to replace with the contents of a text field.

$(document).ready(function(){
// Get latest 6 tweets by jQueryHowto
$.jTwitter('rjames83', 6, function(data){
    $('#posts').empty();
    $.each(data, function(i, post){
        $('#posts').append(
            '<div class="post">'
            +' <div class="txt">'
            // See output-demo.js file for details
            +    post.text
            +' </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-26T06:24:07+00:00Added an answer on May 26, 2026 at 6:24 am

    All you do is wrap the $jTwitter block in a function and pass it a parameter.

    $(document.ready(function(){
    
        function getTweets(username){
            $.jTwitter(username, 6, function(data){
               //rest of your function code here...
            });
        }
        getTweets('rjames83');
    
    });
    
    
    
    // be sure to call "getTweets();" in the doc.ready to call the jQuery when you load the page, as it did before. Why? Wrapping the code in a function is like telling it not to do anything until you call it, instead of automatically loading as it did before.
    

    Wherever you are typing in the new user to grab tweets for, simply add this to the onclick of the button to make it fire:

    onclick="javascript: getTweets($('#textboxid').val());"
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've started working on a little ruby project that will have sample implementations of
I'm currently working on a little project in which I'm trying to create a
I'm still working on my little Tkinter project which is simple a logging console
So I have a little bit of a problem. I working on a project
I am working on a research project that deals with social networks. I have
I have a question, I'm currently working on a little project of mine and
I'm working on a little web-project-management-application. I have a few classes like Clients(), Services(),
I have been working on a little MVC project to assist in my self-learning
I'm working to the following little project: https://github.com/AndreaCrotti/project-organizer Which in short aims to manage
I'm new to Grails and working on my little project. What I have problem

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.