1. Shlomi Fish
  2. shlomi-fish-homepage

Commits

Shlomi Fish  committed 962258e

Add support for the title attribute.

  • Participants
  • Parent commits df4c888
  • Branches convert-from-jquery-treeview-to-jqtree-plugin

Comments (0)

Files changed (1)

File Tests/js/jqtree-from-h-w-json-nav-menu-test.js

View file
             return sub_tree.map(_recurse);
         }
 
+        var title_attr = '';
+
+        if ('title' in sub_tree) {
+            title_attr = ' title="' + sub_tree['title'] + '"'
+        }
         var ret = {
             label: ("<a href=\"" +
-                _get_rel(sub_tree['url']) + "\">" + sub_tree['text'] + "</a>"),
+                _get_rel(sub_tree['url']) + "\"" + title_attr +
+                ">" + sub_tree['text'] + "</a>"
+                ),
         };
 
         if ('subs' in sub_tree) {
                     },
                     {
                         "text": "Humour",
+                        "title": "Stories and Aphorisms I wrote",
                         "url": "humour/"
                     }
                 ]
                     label: '<a href="./../me/">About Myself</a>'
                 },
                 {
-                    label: '<a href="./../humour/">Humour</a>'
+                    label: '<a href="./../humour/" title="Stories and Aphorisms I wrote">Humour</a>'
                 }
                 ],
             },