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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T02:01:18+00:00 2026-05-14T02:01:18+00:00

Im using jquery 1.3.2 and this is the code: <script type=text/javascript> //<![CDATA[ jQuery(function(){ jQuery(‘.news_bullet

  • 0

Im using jquery 1.3.2 and this is the code:

    <script type="text/javascript">
    //<![CDATA[
    jQuery(function(){
        jQuery('.news_bullet a.show_preview').click(function() {
            jQuery(this).siblings('div').slideToggle('slow');
            return false;
        }).toggle(
        function() {
            jQuery(this).css({ 'background-position' : '0 -18px' });
        },
        function() {
            jQuery(this).css({ 'background-position' : '0 0' });
        });
    });
    //]]>
</script>

If you see here i have bunch of small green + which when you click some text is revealed and background-position is changed for that link so then it shows the other part of image, red -.

So the problem i am having is that i dont know the height for those hidden elements, because it depends on how much text there is, so when i click on + and show them, animation is ‘jumping’.

One workaround that i found is to put fixed height and overflow:hidden to those hidden elements. You can see how much smoother animation is running in top left block(the one with ‘Vesti iz sveta crtanog filma’ at the top). All other blocks dont have fixed height, and animation there is ‘jumping’. Atm that fixed height in top left block is 30px, but ofc some elements require more height and some require less, so that is not a good solution… 🙂

So how to stop this animation from ‘jumping’ when there is no fixed height?

  • 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-14T02:01:18+00:00Added an answer on May 14, 2026 at 2:01 am

    If you give them a width in CSS it’ll stop this behavior:

    .news_bullet .hide { width: 272px; }
    

    Or even with jQuery:

    jQuery(".news_bullet .hide").width(272);
    

    Either of these options will stop the jumpy slides 🙂

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

Sidebar

Related Questions

i have this jQuery-AJAX code below and a form: <script type=text/javascript> $(document).ready(function () {
I'm using the following code to load in content: <script type=text/javascript> jQuery.noConflict(); jQuery(document).ready(function(){ jQuery('.content-div').load(all-events.html);
Using this jquery code: <a href=javascript:void(0) id=m1>Get Selected id's</a> jQuery(#m1).click( function() { var s;
how can we save dragged item with cookies. I'm using Jquery with this code
I'm using this jquery code to show and hide divs on my page. As
How to make this css code cross browser compatible using jquery. this code only
ok, im using Jquery (edge) version, and bootstrap 2.0, and i have this code:
i using jquery and jquery-ui, this is my code: <!DOCTYPE HTML PUBLIC -//W3C//DTD HTML
I am using this code: $('.ui-accordion').bind('accordionchange', function(event, ui) { $(this).next().next().css({'background-image':'images/green-bg.jpg'}); //ui.newHeader // jQuery object,
I'm using a tutorial plugin - http://particlebits.com/code/jquery-tutorial/ which has this code attached to the

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.