]> source.dussan.org Git - jquery-ui.git/commitdiff
Menu: Add some testing for ensure that id-attributes aren't overwritten.
authorjzaefferer <joern.zaefferer@gmail.com>
Wed, 23 Feb 2011 16:01:19 +0000 (17:01 +0100)
committerjzaefferer <joern.zaefferer@gmail.com>
Wed, 23 Feb 2011 16:01:19 +0000 (17:01 +0100)
tests/visual/menu/flyoutmenu.html

index 55e7053e5eb0d4a350bc34dcb0e4ca61028d35cc..dc2db8830276adb783a3b469faa8438d38fc63f7 100644 (file)
@@ -54,7 +54,7 @@
                        },
                        */
                        select: function(event, ui) {
-                               $("#log").append("<div>Selected " + ui.item.children("a").text() + "</div>");
+                               $("#log").append("<div>Selected " + ui.item.children("a").text() + "(" + ui.item.children("a").attr("id") + ")</div>");
                                button.focus();
                        }
                }).hide();
 
 <ul id="menu">
        <li>
-               <a href="#">Amsterdam</a>
+               <a id="a1" href="#">Amsterdam</a>
                <ul>
-                       <li><a href="#">Aberdeen</a></li>
-                       <li><a href="#">Ada</a></li>
+                       <li><a id="b1" href="#">Aberdeen</a></li>
+                       <li><a id="b2" href="#">Ada</a></li>
                        <li>
                                <a href="#">Adamsville</a>
                                <ul>
                        <li><a href="#">Amesville</a></li>
                </ul>
        </li>
-       <li><a href="#">Anaheim</a></li>
-       <li><a href="#">Cologne</a></li>
+       <li><a id="a2" href="#">Anaheim</a></li>
+       <li><a id="a3" href="#">Cologne</a></li>
        <li><a href="#">Frankfurt</a></li>
        <li>
                <a href="#">Magdeburg</a>