Просмотр исходного кода

Add hover text to animation dropdown links

Gary Hsu 7 лет назад
Родитель
Сommit
266c95c5f2
1 измененных файлов с 2 добавлено и 0 удалено
  1. 2 0
      sandbox/index.js

+ 2 - 0
sandbox/index.js

@@ -388,6 +388,7 @@ dropdownBtn.addEventListener("click", function () {
 function createDropdownLink(group, index) {
     var animation = document.createElement("a");
     animation.innerHTML = group.name;
+    animation.title = group.name;
     animation.setAttribute("id", formatId(group.name + "-" + index));
     animation.addEventListener("click", function () {
         // stop the current animation group
@@ -403,6 +404,7 @@ function createDropdownLink(group, index) {
         currentGroup.start(true);
         this.classList.add("active");
         dropdownLabel.innerHTML = currentGroup.name;
+        dropdownLabel.title = currentGroup.name;
 
         // set the slider
         slider.setAttribute("min", currentGroup.from);