언어 설정

Menu
Sites
Language
How to add popup on taphold event

Hi, guys! 

How to describe the event correctly, because now I do it like this:

<div data-role="page" id="contactsView">

<div data-role="header" class="page-header" data-position="fixed">

</div>

<div data-role="content" id="page-content" data-scroll="y">

           <ul id="contactList" data-role="listview" data-autodividers="true" data-fastscroll="true" data-filter="true" data-position="fixed" ></ul>

</div>

<a href="#popMenu" id="invisButton" data-rel="popup" data-position-to="window" data-role="button"></a>
<div id="popMenu" data-role="popup" class="center_liststyle_2btn">

<div class="ui-popup-title">

<h1 contid ="" >Select item</h1>

</div>

<div class="ui-popup-scroller-bg" data-scroll="y">

<ul data-role="listview" id="popupDynamicList" data-icon="1line-textonly">

<li><a elemId="1">Call</a></li>

<li><a elemId="2">Message</a></li>

<li><a elemId="4">Delete</a></li>

</ul>

</div>

<div class="ui-popup-button-bg">

<a data-role="button" data-rel="back" data-inline="true">Cancel</a>

</div>

</div>
</div>

js:

.on('click taphold', 'li:not([data-role="list-divider"])', function (event) {

if (event.type === 'taphold') {

$('#contactsView #invisButton').trigger('click');

}

it does not work perfectly, because the menu jumps down and not in the middle of the screen, and after "taphold" running event "tap" O_o

 
Edited by: Brock Boland on 17 3월, 2014 Reason: Paragraph tags added automatically from tizen_format_fix module.

Responses

3 댓글
konduri sai swathi
Hi, As you are triggering click event on button the popup will open relative to that button.
Enjo
yes, that's why menu jumps down. How fix or differently start pop menu?
konduri sai swathi
I have tried with $('#popup').popupwindow('open'); and even this is producing the same result as your's. The framework itself is placing the popup window in that position. when i inspected, the element has style "top:320px;" and there is no chance to override that style.