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

  • Home
  • SEARCH
  • 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 7811115
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T04:02:44+00:00 2026-06-02T04:02:44+00:00

var add_time = function ($category) { ‘use strict’; var time_element = $(‘<input size=7 class=time

  • 0
var add_time = function ($category) {
    'use strict';

    var time_element = $('<input size="7" class="time" placeholder="00:00" pattern="(?:(?:\\d:)?[0-5])?\\d:[0-5]\\d" title="Please insert a time in the form of [[h:]m]m:ss." />');

    if ($('.time').length === 0) {
        time_element.insertAfter($category.find('.add_time_button'));
    } else {
        time_element.insertAfter($('.time'));
    }
};

$('.add_time_button').click(function () {
    'use strict';

    add_time($(this).parentsWhen('.category'));
});

I don’t get it. No console errors. Everything looks fine to me. Ran it through JSFiddle. Nothing. Sigh. The question is all in the title. Here’s the jsFiddle: http://jsfiddle.net/gtr053/N2HmG/

To future readers, this will be a 404 someday soon. Live site: http://bama.ua.edu/~tscrompton/annotation/

  • 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-02T04:02:45+00:00Added an answer on June 2, 2026 at 4:02 am

    jsfiddle surrounds your javascript in a onLoad. On your site, where are you putting the javascript? In the head section? If so, that’s why it’s not working. You have to assign your onclicks and all that jazz after the elements load.

    EDIT:

    In your javascript file you can do this:

    $(document).ready(function(){
        //put the javascript from the jsfiddle in here
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

$('#types').change(function() { var htmlToAppend = <br/><input id='btnAddDictionary' type='button' value='Add Dictionary' />; if ($(#types).val() ==
version 1: function add(){ var a = 2; ... ... ... } version 2:
How do I add a class for the div ? var new_row = document.createElement('div');
I having problem with append() when the textbox is focus the second time. var
Let's say I have a JavaScript object: function a(){ var A = []; this.length
Every time I try to add my var of record it will not run
In my case, the timer I make doesn't reduce its time whenever a function
I am trying to use the JavaScript Module Pattern and I run into a
I have a multidimentional array that is generated by: $('#order-submit').click(function(){ var orderResult = [];
The datepicker function only works on the first input box that is created. I'm

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.