Mosync HTML Popup Menu

93 views
Skip to first unread message

Joao Barbosa

unread,
May 21, 2013, 11:57:37 AM5/21/13
to mosyn...@googlegroups.com

Hi again.

I'm trying to do a popup menu (native like) for each element of a HTML list and in my browser works ok but in android emulator it doesn't.
Here's the code:

packList.onmouseup = function() {
if (secs > 0) {
showPopupMenu();
alert("here");
}
clearInterval(inter);
secs = 0;
};

packList.onmousedown = function() {
inter = setInterval(function () {
alert("here2");
++secs;
} , 1000);
}


<ul id="popupmenu" class="pmenu">
  <li><a href="#" onclick="alert('style a'); hidePopupMenu();" class="parent">Switch view</a></li>
  <li><a href="#" onclick="alert('style a'); hidePopupMenu();" class="parent">Switch view</a></li>
</ul>


#list{
margin: 0;
padding: 0;
list-style: none;
width: 100%;
max-width: 450px;
}

#list li{
margin: 1em;
border-bottom-style: solid;
border-width: thin;
}
#list li:before {
    content: "\2708";
    margin-right: 1em;
}

ul.pmenu {
    position: absolute;
    padding: 1px;
    list-style: none;
    border: 1px solid #ccc;
    background: white;
    display: none;
    z-index: 10;
    left: 100px;
    top: 100px;
}

ul.pmenu li {
    position: relative;
border-bottom-style: solid;
border-width: thin;
}

ul.pmenu li ul {
    position: absolute;
    display: none;
    z-index: 10;
}

/* Styles for Menu Items */
ul.pmenu li a {
    display: block;
    text-decoration: none;
    color: black;
    padding: 2px 0px 2px 0px;
}

ul.pmenu li a:hover {
    background:#335EA8;
    color:white;
}

ul.pmenu li:hover ul, ul.pmenu li.over ul { 
display: block; 
}


can anyone help me?

Joao Barbosa

unread,
May 23, 2013, 10:16:23 AM5/23/13
to mosyn...@googlegroups.com
Anyone can help?
Reply all
Reply to author
Forward
0 new messages