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 are the page-break properties in CSS supposed to work?

    How can create a two-column layout in CSS where one column shrinks to it's content, and the other expands to fill the remaining space?

    How to use Effeckt.css?

    How to make a resizable menu centered on the middle?

    How can I hide page elements till an AJAX call completes?

    How to bring in the right margin of a paragraph with border

    How do I make my links be next to each other in CSS/HTML?

    How to change class of all children with jquery?

    How to get a button to fill the full width of the footer in Mobile View?

    How do I make this list not break lines when browser size is changed?

    How to develop Desktop Apps using HTML/CSS/JavaScript? [closed]

    How to change css for active link based on the hashtag

    How to apply CSS to first child div element only?

    How to change Google Chrome Arabic default font in css?

    How can I change css stylesheet with dart?

    How to use CSS to style the results of a PHP echo?

    How to convert css into bss

    How to get the “text-justify:kashida” css property effect on to the arabic text excluding IE browsers

    How to preload large css and javascript files in vanilla javascript

    How can I take advantage of Sass, for example, in rendering FizzBuzz?

    How to make css styles in the document body only specific to a div

    how to indent jqgrid table?

    How to set background image to keep its position while browser width is changing?

    How to align a table menu to an Banner

    So I have an HTML file with a paragraph and I need to break into three lines BUT i can only modify the CSS. How do I pull this off? (code below)

    how to replace entire css text with another?

    How to replace fixed values in responsible form css

    how to increase border line from the center using css animation

    Ionic2 : How to set up css in single page

    How can I set the color of the border area around the page/post on my Wordpress Site