separate countdown for divs
问题 I want to show countdown in each of my divs. Right now I get the seconds from my database and store in in data-countdown attribute and then use the following js code for countdown. Only the first div changes the value every second and the other ones do not change. Here is the fiddle: http://fiddle.jshell.net/j61qs7oc/ //imagine this line of code in every loop of a for loop so $remaining will be different <div style="font-size: 25px; color:#e3b40b ; font-weight: 600;" data-countdown="'.