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'));
});
我不明白。没有控制台错误。在我看来一切都很好。通过 JSFiddle 运行它。没有。叹。问题全在标题中。这是 jsFiddle:http: //jsfiddle.net/gtr053/N2HmG/
对于未来的读者,这将很快成为 404。直播网站:http ://bama.ua.edu/~tscrompton/annotation/