Javascript 有些东西有用。大师们可以以外科手术的精度介入,立即发现问题,并做出所需的微小改变。它来自经验,这就是一切。我已经为你的项目工作过几次,所以我对它有点熟悉:)当然,如果我有那9年的时间,我可能会回答而不是问,但现在我就是这样。是的,你做过几次,我不会忘记,所
Javascript 有些东西有用。大师们可以以外科手术的精度介入,立即发现问题,并做出所需的微小改变。它来自经验,这就是一切。我已经为你的项目工作过几次,所以我对它有点熟悉:)当然,如果我有那9年的时间,我可能会回答而不是问,但现在我就是这样。是的,你做过几次,我不会忘记,所,javascript,jquery,html,css,Javascript,Jquery,Html,Css,有些东西有用。大师们可以以外科手术的精度介入,立即发现问题,并做出所需的微小改变。它来自经验,这就是一切。我已经为你的项目工作过几次,所以我对它有点熟悉:)当然,如果我有那9年的时间,我可能会回答而不是问,但现在我就是这样。是的,你做过几次,我不会忘记,所以再次感谢你帮助我:o) $('li').on('click', function(e) { e.preventDefault(); // remove selected class from links after the cur
有些东西有用。大师们可以以外科手术的精度介入,立即发现问题,并做出所需的微小改变。它来自经验,这就是一切。我已经为你的项目工作过几次,所以我对它有点熟悉:)当然,如果我有那9年的时间,我可能会回答而不是问,但现在我就是这样。是的,你做过几次,我不会忘记,所以再次感谢你帮助我:o)
$('li').on('click', function(e) {
e.preventDefault();
// remove selected class from links after the current one
$(this).closest('section').nextAll('section').find('li').removeClass('selected');
// remove selected from siblings, toggle current selected class
$(this).siblings('li').removeClass('selected').end().toggleClass('selected');
var $target = $('#' + $(this).attr('data-id'));
if ($target.length) {
// hide any steps after the current one that may be shown
$(this).closest('section').nextAll('section').find('.step').not($target).removeClass('active');
// toggle display of selected step
$target.toggleClass('active', $(this).hasClass('selected'));
} else {
console.log('do something else to end this thing');
}
})
// remove selected from siblings, toggle current selected class
$(this).siblings('li').removeClass('selected').end().toggleClass('selected');
// remove selected from siblings if not multiple
if (!$(this).closest('section').hasClass('multiple')) {
$(this).siblings('li').removeClass('selected');
}
// toggle current selected class
$(this).toggleClass('selected');