Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 1 of 1
  1. #1
    Senior Member
    Join Date
    Nov 2012
    Posts
    113
    Member #
    33949
    Liked
    2 times

    where about would I put the following animation code into my website.

    I have an animation code snippet I would like to put into my child theme.
    it is at themehunt.com/blog/32-free-resources/70-10-stunning-free-countdowns-timer-scripts-for-your-next-theme. It is the 5th one down. called Draft Countdown.

    It is made up of html, css, and javascript. I would like to know if I must put the css part in style.css, the javascript in the footer part and which file, like footer.php or what file. And where to put the html, - would I also put the html in example, the footer.php file.
    Do I then need to call these enque these files in functions.php.
    Does any of the code need to go into functions.php.

    I am overwhelmed by this, and dont know where to begin actually.

    Here is the html code:

    <div class="wrap">
    <h1>Draft <strong>Countdown</strong></h1>


    <div class="countdown">
    <div class="bloc-time hours" data-init-value="24">
    <span class="count-title">Hours</span>


    <div class="figure hours hours-1">
    <span class="top">2</span>
    <span class="top-back">
    <span>2</span>
    </span>
    <span class="bottom">2</span>
    <span class="bottom-back">
    <span>2</span>
    </span>
    </div>

    here is the css code:

    @import "compass/css3";


    // Global
    body {
    background-color: #f2f1ed;
    }


    .wrap {
    position: absolute;
    bottom: 0;
    top: 0;
    left: 0;
    right: 0;
    margin: auto;
    height: 310px;
    }


    a {
    text-decoration: none;
    color: #1a1a1a;
    }


    // Variables
    $lato: 'Lato';


    // Title
    h1 {

    here is the javascript:

    // Create Countdown
    var Countdown = {

    // Backbone-like structure
    $el: $('.countdown'),

    // Params
    countdown_interval: null,
    total_seconds : 0,

    // Initialize the countdown
    init: function() {

    // DOM
    this.$ = {
    hours : this.$el.find('.bloc-time.hours .figure'),
    minutes: this.$el.find('.bloc-time.min .figure'),
    seconds: this.$el.find('.bloc-time.sec .figure')
    };


    // Init countdown values
    this.values = {
    hours : this.$.hours.parent().attr('data-init-value'),
    minutes: this.$.minutes.parent().attr('data-init-value'),
    seconds: this.$.seconds.parent().attr('data-init-value'),
    };

  2.  


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 11:45 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com