This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2018/06/28;10:43am | |
//日期點擊無連續(上)下一頁,只能點擊一次 | |
$('#previous-month').on('click', function () { | |
var leftBtn = $('#wrapper').scrollLeft(); | |
$('#wrapper').animate({ | |
scrollLeft:leftBtn - 100 | |
},300); | |
}); | |
$('#next-month').on('click', function () { | |
var rightBtn = $('#wrapper').scrollLeft(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2018/06/27;10:46am | |
//html - | |
<div id="previous-month" class="leftArrow trigger prev"><!-- onclick="preMonth()" --> | |
<a href="#" class="text-primary"> | |
<i class="fas fa-4x fa-angle-left"></i> | |
</a> | |
</div> | |
<div id="next-month" class="rightArrow trigger next"><!-- onclick="nextMonth()" --> | |
<a href="#" class="text-primary"> | |
<i class="fas fa-4x fa-angle-right"></i> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//html - | |
var tableAdd = ''; | |
tableAdd = '<div class="table">' + | |
'<div class="' + evenMonth + 'caption">' + | |
'<div class="centered">' + | |
'<span class="divYear col-12">' + nYear + '</span>' + | |
'<br><br>' + | |
'<span class="divMonth">' + nMth + '</span>月' + | |
'</div></div>' + | |
'<div class="data-content">' + |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//2018-07-03 | |
網友大大: | |
ps:如果你想判断,就应该在for循环主体里重新var一个日期,然后提取m y,再判断i m y三者是否等于你的全局变量yearnow month daynow ,如果等 就找到了这个i ,然后给i添加新标签就行了 | |
//產生日期 判斷年月日是否當天,如果是擇會自動加上class:present | |
function current(dayCount, yearNow, monthNow) { | |
var date = new Date(); | |
var y = date.getFullYear(); |