Cleanup and simplify JS code
Change-Id: I393e22763c1a1d18878026bf459b747b150429fb
diff --git a/dev/js/src/selectMenu.js b/dev/js/src/selectMenu.js
index d44d756..9f447ca 100644
--- a/dev/js/src/selectMenu.js
+++ b/dev/js/src/selectMenu.js
@@ -1,5 +1,5 @@
define(
- ['menu', 'selectMenu/item'],
+ ['menu', 'selectMenu/item', 'util'],
function (menuClass, selectMenuItemClass) {
return {
@@ -42,8 +42,8 @@
obj._select.style.display = 'none';
// Create title
- obj._title = obj._container.appendChild(document.createElement('span'));
- obj._title.appendChild(document.createTextNode(''));
+ obj._title = obj._container.addE('span');
+ obj._title.addT('');
obj._container.appendChild(obj.element());
// Show the menu