$("span:contains(" pageNum ")").addClass("current")
pageNum is the subscript of the page, but if pageNum is 1, then 10, 11, and 12 will all execute addClass. Is there any good way to do this? Achieve accurate matching?
大家讲道理2017-07-05 10:42:51
When rendering the subscript, add the index to the span's class. When retrieving, get the index through the current page number, and then add the class to the span corresponding to the index.