How to realize countdown Mini App with jquery
This article mainly explains "jquery how to achieve countdown mini application", the content of the article is simple and clear, easy to learn and understand, now please follow the editor's train of thought slowly in depth, together to study and learn "jquery how to achieve countdown mini application" bar!
Html
Xiaomi Note top version
All Netcom champagne gold mobile Unicom dual 4G mobile phone dual card dual standby
From RMB 2998
Xiaomi Note top version
All Netcom champagne gold mobile Unicom dual 4G mobile phone dual card dual standby
From RMB 2998
Jquery
$(function () {var abj = $("# shop_rec"), timeObj = abj.find ('.time'); var starttime = timeObj.data ('starttime'); / / timer function function actionDo () {return setInterval (function () {timeObj.each (index, el) {var t = $(this), surplusTime = t.data (' endtime')-starttime) If (surplusTime 0) {t.append ("" + showYear+ "year")}; if (showMonth > 0) {t.append ("" + showMonth+ "month")}; if (showDay > 0) {t.append ("" + showDay+ "day")} If (showHour > = 0) {t.append ("" + showHour+ "hours")}; if (showMinute > = 0) {t.append ("" + showMinute+ "minutes")}; if (showSeconds > = 0) {t.append ("" + showSeconds+ "seconds")};}; starttime++;}, 1000) / / set execution or delay time}; / / execute it actionDo ();}); Thank you for reading. The above is the content of "how to realize the countdown applet in jquery". After the study of this article, I believe you have a deeper understanding of how to implement the countdown applet in jquery, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!