how to show the hidden div with same properties css with jquery


Tags: javascript,html,css,position

Problem :

how to show the hidden div (info-alimento1) with same properties css with jquery, because with .show() , not working,changes the position

http://jsfiddle.net/acuario1220/kegctsnv/2/

$("#alimento1").mouseenter(function() {
            $( "#alimento2" ).fadeTo( "slow", 0.40 );
            $( "#info-alimento1" ).show();
        });
        $("#alimento1").mouseleave(function() {
            $( "#alimento2" ).fadeTo( "slow", 1 );



        });


Solution :

The .show() will set your element to be display: block; instead of display: inline-block; as you intend.. so to do this, you can instead do .css({display: 'inline-block'});


    CSS Howto..

    How to fix the top row and first column in a webpage, with only CSS

    How to change css property of the particular selection text in a input field using javascript

    How to notify view from model to change a value in backbone

    How to vertical align element relative other element with pseudo-class? [duplicate]

    CSS- How to create child menu towards leftern side

    How to display a background image with a:hover

    How to use CSS attribute selector for an SVG element with namespaced attribute href?

    How to start with responsive deisgn [closed]

    How to organize CSS Sheets [closed]

    How can I set inline css styles for an element with javascript?

    Show just cursor (caret) but hide the letters in input

    How to auto adjust margin to Auto center vertical & horizontal using jQuery and CSS margin

    How to set CSS attributes to default values for a specific element (or prevent inheritance)

    CSS3 Box, How to stop automatic resize with content?

    How to flip multiple divs using CSS?

    How to locate and use fonts in Qt for Embedded Linux?

    how to select all list items except for the first and last using CSS only?

    How to set ul width in percent?

    How to visually re-order elements in a scrolling dropdown input div?

    Captions after 1st slide doesnt show for flexslider

    How to create a “dot-dash” border with css or javascript?

    How to use Javascript to get a visitors monitor resolution?

    CSS: How to align elements around a centered element?

    How to change the dimensions of a div depending of a number extern to that div? jquery/css

    How is this menu icon created only with CSS?

    How do I control the spacing between my child links in my CSS driven menu dropdown?

    How can I prevent a flex container from overflowing/underflowing?

    How to remove extra space in navigation bar? [duplicate]

    How can I hide the backface of a block element rotated with transform: rotateX()?

    how to make html table first row 'absolute'