1.11M Members

Why isn't this <div> exploding?

 
0
 

The HTML:

<!DOCTYPE HTML>
    <head>
        <link rel="stylesheet" type="text/css" href="/Users/Alireza/Desktop/Index.css" />
        <script src="http://www.ajax.googleapis.com/ajax/libs/jqueryui/1.9.1/jquery-ui.min.js"></script>
        <script type="text/javascript" src="/Users/Alireza/Desktop/Index.js"></script>
    </head>
    <body>
        <div></div>
    </body>

The CSS:

div{
    height: 100px;
    width: 100px;
    background-color: red;
    border: 4px dashed #00FF00;
}

The jQuery:

$(document).ready(function(){
    $('div').click(function(){
        $('div').effect('explode');
    })
})

Please help me. I really don't know why it isn't working. Go ahead and try the code if it helps you. Thank you, in advance.

 
0
 

You did it work read this: http://api.jqueryui.com/explode-effect/

That didn't necessarily help because I still can't seem to make the <div> explode.

 
0
 

You did it work read this: http://api.jqueryui.com/explode-effect/ That didn't necessarily help because I still can't seem to make the <div> explode.

Sorry, I figured it out. Thanks though.

 
0
 

What was the problem and how did you fix it?

 
0
 

What was the problem and how did you fix it?

Well, whenever I clicked on the <div>, it wouldn't do anything. So, I updated the link and gave the <div> a class of "div". That was so the effect specifically, and only, acted on the one <div>. Updating to the newest version of the jQuery UI also helped.

Question Answered as of 1 Year Ago by JorgeM and LastMitch
You
This question has already been solved: Start a new discussion instead
Post:
Start New Discussion
View similar articles that have also been tagged: