8/13 Electr(on)ic Slide CSS Bug, Workaround!


#1

I'm pretty frustrated...hopefully this will save others.

The CSS bug was mentioned in another post but it needs to be fixed! Also I have a workaround so people don't get stuck.

The CSS file doesn't work (can't access it), so I'm running the code in problem 9 because it's basically a sandbox. Try code below.

You need to add "display: none" to your div CSS code so that it will be able to slide down. It can't just slide down if it's already on the page.

HTML

<!DOCTYPE html>
<html>
    <head>
        <title></title>
        <script type="text/javascript" src="script.js"></script>
        <link rel="stylesheet" type="text/css" href="stylesheet.css"/>
    </head>
    <body>
        <div></div>
    </body>
</html>

CSS

div{
    height:100px;
    width:100px;
    display: inline-block;
    background-color: blue;
    display: none;
}

JS

$(document).ready(function() {
    $('div').slideDown('slow');
});

#2

Thanks for putting that together J. Preciate that.


#3

Been stuck on this lesson for ages, thank you.


#4

8 posts were split to a new topic: Why Does This Not Work in a Normal Browser?


#5

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.