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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T14:06:24+00:00 2026-05-23T14:06:24+00:00

Thanks for taking a look at this question. I am trying to get the

  • 0

Thanks for taking a look at this question. I am trying to get the jQuery expander function to work in my UI.

The problem is, it works when the data is hardcoded in the HTML but it does not work when data is dynamically placed by jQuery.

I have created 4 slides to better illustrate the issue (see below for images):

SLIDE 1: The UI that contains the small text I am trying to expand in each module shown.

SLIDE 2: The div structure set up for jQuery to populate date in realtime

SLIDE 3: Chrome Inspector showing the data dynamically held in memory (not in the HTML source)

SLIDE 4: The expander function works when I hardcode this in the HTML:

<div class="tags-hidden"><p>some data...</p></div>

Here is the origin of the expander function:
http://plugins.learningjquery.com/expander/

Many, many thanks for any help or advice you could offer. Here are the slides:

Slide 1

Slide 2

Slide 3

Slide 4

EDIT 1 – Here is the new code based on your suggestion to use .live()… It doesn’t seem to get called on click:

<script type="text/javascript">
$(document).ready(function() {
$('.div.tags-hidden p').live('click', function() {
    $('div.tags-hidden p').expander({
      slicePoint:       80,  // default is 100
      expandText:         '[...]', // default is 'read more...'
      collapseTimer:    5000, // re-collapses after 5 seconds; default is 0, so no re-collapsing
      userCollapseText: '[^]'  // default is '[collapse expanded text]'
  });
});
</script>
  • 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-23T14:06:25+00:00Added an answer on May 23, 2026 at 2:06 pm

    I think you jeed to use .live() for elements that are not displayed when the page is rendered.
    Take a look here http://api.jquery.com/live/

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

Sidebar

Related Questions

Thanks for taking a look at my question. I'm trying to create a graph
Thanks for taking a look at this. The issue has to do with the
First of all thanks for taking the time to look into this. I store
and thanks for taking a look at the question. The background I have several
Thanks for taking the time to look at another of my questions. This seems
thanks for taking the time to look at my question. I've been diving into
Ive been trying to get this to work for the last week and cannot
Thanks for taking the time to read this. I have an unknown number of
thanks for taking the time to stop by my question. Below you will find
Thanks everyone for taking the time to read this. I have styled my navigation

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.