浏览代码

Add hover text to animation dropdown links

Gary Hsu 7 年之前
父节点
当前提交
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) {
 function createDropdownLink(group, index) {
     var animation = document.createElement("a");
     var animation = document.createElement("a");
     animation.innerHTML = group.name;
     animation.innerHTML = group.name;
+    animation.title = group.name;
     animation.setAttribute("id", formatId(group.name + "-" + index));
     animation.setAttribute("id", formatId(group.name + "-" + index));
     animation.addEventListener("click", function () {
     animation.addEventListener("click", function () {
         // stop the current animation group
         // stop the current animation group
@@ -403,6 +404,7 @@ function createDropdownLink(group, index) {
         currentGroup.start(true);
         currentGroup.start(true);
         this.classList.add("active");
         this.classList.add("active");
         dropdownLabel.innerHTML = currentGroup.name;
         dropdownLabel.innerHTML = currentGroup.name;
+        dropdownLabel.title = currentGroup.name;
 
 
         // set the slider
         // set the slider
         slider.setAttribute("min", currentGroup.from);
         slider.setAttribute("min", currentGroup.from);