Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7873179
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T02:26:16+00:00 2026-06-03T02:26:16+00:00

This seems to be a more common problem, but when I try to use

  • 0

This seems to be a more common problem, but when I try to use code off of jsfiddle (html/css/javascript) it doesn’t work. I’m trying to get a CSS animation to repeat onclick, and found some on links on other questions to jsfiddle that work. However, they do not work when I try to do them on DreamWeaver, and I get no error.

I have http://jsfiddle.net/vxcYJ/45/ , http://jsfiddle.net/AndyE/9LYAT/, and http://jsfiddle.net/6tZd3/, and none work. On dreamweaver, I believe the third jsfiddle would translate into something like this:

<!DOCTYPE>
<head>
<style>
.animate {
    -webkit-transition-property: -webkit-transform;
    -webkit-transition-duration: 1s;
    -webkit-transition-timing-function: linear;
}

.initial {
    -webkit-transform: rotate(0deg);
}

.final {
    -webkit-transform: rotate(360deg);
}​
</style>
<script>
document.getElementById('button').addEventListener('click', function()
{
    this.setAttribute('class', 'animate final');
});

document.getElementById('button').addEventListener('webkitTransitionEnd', function() {
    this.setAttribute('class', 'initial');
});​
</script>
</head>

<body>
<button type="button" id="button" class="animate initial">Click me!</button>​
</body>
</html>

one more thing, at the end of the button, this->​ appears for some reason. If anyone could help me out, that would be greaty appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T02:26:17+00:00Added an answer on June 3, 2026 at 2:26 am

    Your code is failing for two reasons. Firstly, there are two illegal characters at different places in your code. The one you can see which appears next to the button when you run the page, and the second, which is causing an error in the JavaScript, after the webkitTransitionEnd event listener. Secondly, when you try to add the event listeners to your button in the head of your document, it fails because the DOM has not registered with the browser yet.

    The following code should work. You might also consider looking at the jQuery document ready function.

    <!DOCTYPE>
    <head>
    <style>
    .animate {
        -webkit-transition-property: -webkit-transform;
        -webkit-transition-duration: 1s;
        -webkit-transition-timing-function: linear;
    }
    
    .initial {
        -webkit-transform: rotate(0deg);
    }
    
    .final {
        -webkit-transform: rotate(360deg);
    }​
    </style>
    
    </head>
    
    <body>
    <button type="button" id="button" class="animate initial">Click me!</button>​
    
    <script>
    document.getElementById('button').addEventListener('click', function()
    {
        this.setAttribute('class', 'animate final');
    });
    
    document.getElementById('button').addEventListener('webkitTransitionEnd', function() {
        this.setAttribute('class', 'initial');
    });
    </script>
    </body>
    </html>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

It seems like this is a common problem, but I can't seem to find
It seems this must be a common scheduling problem, but I don't see the
This seems like a basic question, but it's still bugging me. Why doesn't MyObject
This seems a to be a common issue, but i just can't find a
It seems a very common problem. But I couldn't find any working solution. We
I've been investigating this issue that only seems to get worse the more I
This seems to be a problem related to Safari only. I've tried 4 on
This seems like it should be obvious but I can't figure it out. Suppose
This seems to be a trivial question but I got hung on it for
This seems like a basic question, but I haven't found any clear answers. Essentially,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.