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.

Member Avatar for LastMitch

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.

You did it work read this:

http://api.jqueryui.com/explode-effect/

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.

What was the problem and how did you fix it?

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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.