设置焦点顺序(Webworks)

时间:2013-01-02 02:54:23

标签: jquery html5 blackberry-webworks

我的应用重点订单似乎无序。该应用程序应该从webservices检索记录列表,然后使用div中的for循环显示。

示例:

function loadListing()
{
  var listing = "";
  var value = new Array('One', 'Two', 'Three', 'Four', 'Five', 'Six', 'Seven', 'Eight', 
  'Nine', 'Ten');

  listing += '<div style="background-color: purple; color: yellow; padding: 10px;  
  margin-bottom: 10px;">I\'m some big listing</div>';

  listing += '<div id="container">';

  for(var h = 0; h < 10; h++)
  {
    listing += '<div class="innerContainer" x-blackberry-focusable="true" 
    onmouseover="bigHover(this)" onmouseout="dontHover(this)">';
    listing += '<div style="font-size: 20px; font-weight: bold;">'+value[h]+'</div>'; 
    listing += '</div>';
  }
  listing += '</div>';

  listing += '<div style="background-color: purple; color: yellow; padding: 10px;   
  margin-top: 20px;margin-bottom: 10px;">I\'m self-generate listing</div>';
  for(var i = 1; i <= 10; i++)
  {
    listing += '<div><ul class="ulClass">';
    listing += '<li><span class="pretty" x-blackberry-focusable="true"   
    onmouseover="hoverMe(this)" onmouseout="dontHover(this)">' +i+' </span></li>';
    listing += '</ul></div>';
  }
 $('#mainBody').html(listing);
}

CSS:

.ulClass{ list-style: none; margin: 0; padding: 0; }

.ulClass li{ display: inline; float: left; }

.pretty{ font-size: 20px; color: orange; border: 1px solid orange; padding: 3px; 
         margin: 3px; width: 5px; }

当用户完成对列表的滚动时,分页上的下一个可聚焦元素(ul class =&#34; paging&#34;)将在第10页而不是第1页。

Fiddle

有人可以帮忙吗?

0 个答案:

没有答案