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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T12:21:33+00:00 2026-05-18T12:21:33+00:00

In this jquery plugin: http://www.stahs.org.uk/jquery.infinitecarousel.bak There’s this line: $(obj).append(‘<div id=textholder’+randID+’ class=textholder style=position:absolute;bottom:0px;margin-bottom:’+-imgHeight*o.textholderHeight+’px;left:’+$(obj).css(‘paddingLeft’)+’></div>’); Problem is

  • 0

In this jquery plugin:

http://www.stahs.org.uk/jquery.infinitecarousel.bak

There’s this line:

            $(obj).append('<div id="textholder'+randID+'" class="textholder" style="position:absolute;bottom:0px;margin-bottom:'+-imgHeight*o.textholderHeight+'px;left:'+$(obj).css('paddingLeft')+'"></div>');

Problem is when it dumps the text node in this div, it aligns to the top of the div. I want text to align to bottom of div. So I decided to create another div within this div:

$(obj).append('<div id="textholder'+randID+'" class="textholder" style="position:absolute;bottom:0px;margin-bottom:'+-imgHeight*o.textholderHeight+'px;left:'+$(obj).css('paddingLeft')+'"></div>');
            console.log($('#textholder'+randID));
            $('#textholder'+randID).append('<div style="display:table-cell; height: 94.25px; width: 1000px; vertical-align:bottom;"></div>'); 

The console outputs this:

[div#textholder35196647.textholder]
[div#textholder62315889.textholder]
[div#textholder95654959.textholder]

However, my above append is not working. The nested div never shows up, so when I later do this:

                    if(t != null)
                {
                    $('#textholder'+randID+' div').html(t).animate({marginBottom:'0px'},500); // Raise textholder
                    showminmax();
                }

No text becomes visible because the nested div never gets created.

So I am extremely confused. If you look at original plugin, this line works:

 $('#textholder'+randID+' div').html(t)

How is it able to target the right div here yet when I append to it right after it’s created, it doesn’t exist, as you guys suggest?

This doesn’t work either:

                var $texthold = jQuery('<div id="textholder'+randID+'" class="textholder" style="position:absolute;bottom:0px;margin-bottom:'+-imgHeight*o.textholderHeight+'px;left:'+$(obj).css('paddingLeft')+'"></div>');
            $(obj).append($texthold);
            $texthold.append('<div></div>')

Thanks for response.

  • 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-18T12:21:33+00:00Added an answer on May 18, 2026 at 12:21 pm

    It appears this worked:

                function showtext(t)
                {
    
                    if(t != null)
                    {   
    
                        if(typeof $('#textholder'+randID).find('div')[0] == 'undefined'){
                            $('#textholder'+randID).append('<div style="display:table-cell; height: 94.25px; vertical-align:bottom;"></div>');
                        }
    
                        $('#textholder'+randID+' div').html(t);
    
                        $('#textholder'+randID).animate({marginBottom:'0px'},500); // Raise textholder
                        showminmax();
    
                    }
                }
    

    It’s just kind of crazy I had to resort to using typeof to check whether div is declared or not. Why the author of the plugin decided to randomly assign integers as ids of divs is beyond me. By doing that, it appears javascript has difficulty retaining the randomly created id. That’s my only explanation for the unusual behavior I could come up with.

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

Sidebar

Related Questions

I have this little jQuery plugin: <!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN http://www.w3.org/TR/html4/loose.dtd>
I'm using this jQuery plugin: http://www.xarg.org/project/jquery-webcam-plugin/ When I run this code on localhost ,
I'm using this JQuery autocomplete plugin http://www.devbridge.com/projects/autocomplete/jquery/ in my project. I followed this tutorial
I'm using this great plugin: http://www.sanisoft.com/blog/2009/06/22/jquery-auto-correct-plugin/ But it's not working with 1.6.2 or greater...
I am looking for a jQuery plugin exactly like on this page: http://www.specsavers.co.uk/stores/kingsbury/your-appointment/
In this link: http://css-tricks.com/snippets/jquery/jquery-plugin-template/ it has a line of code that says // Add
I'm using this plugin: http://www.fyneworks.com/jquery/star-rating/ Is it possible to put a click function inside
I'm trying to create a custom composite component colorPicker using this jQuery plugin http://www.eyecon.ro/colorpicker/
I'm using the jquery cycle plugin to create a simple slideshow with thumbnails. http://www.ttmt.org.uk/forum/slideshow/
I am using this jQuery plugin in my app http://www.building58.com/examples/tabSlideOut.html It all works well

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.