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

$("#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 create a speech bubble in css?

    How to get css to work in Django [closed]

    How to arrange subchild in the horizontal menu

    How to add a z-index to separate image from div border

    How can I make sure that the footer will always be on the bottom of the last page when printing out?

    How to style SVG via css?

    How can I let div inside bootstrap colum scrollable

    How to make dropdown hide when clicked anywhere outside of it?

    How to remove default border of button in jquery mobile?

    How center an absolute element (img) that's wider than its parent div?

    I want to add same function for two css class. How can I do it?

    How to check image is visible (Webdriver)

    How to decrease spacing between bootstrap glyphicons

    How would you explain CSS positioning to a human being?

    How to import a CSS file from an external bundle resource

    how to draw a shape by using canvas or css? [closed]

    How do I specify that a html cell should have the minimum width it needs to display all of its content

    How can I indent all text in a paragraph except the first line?

    How to remove the circle in the background of the impress.js demo

    How do I create triangles like this? [closed]

    How to convert a .PNG file into a source code that can be stored into mysql and called up via CSS as “png”

    How to Insert Images inside DIV in this case

    Slideshow image with buttons

    Showing an hidden element with an opacity-animation

    How to hide a part of a CSS borderline nicely

    How to set a image/icon width that was specified through css content property?

    Flexslider - How to make two slider functioning together (images and a paragraph text) using a single directionNav?

    How to create a list with three columns in a row by css and html?

    ExtJS how to remove grid row underline when selected and over

    How to make a curved edge hexagon by using CSS