小编Wil*_*iam的帖子

在移动Safari中未触发的li元素中的div的Jquery单击事件

修复:最后我直接生成元素而不是由jQuery呈现.

更新2:关于真正的问题似乎很清楚.我做了几个测试,只有一个测试我在其中插入一个链接.但我不想绑定整个li元素,而是绑定li中的div元素.

更新:我做了一些关于div的位置的修改,它现在在android中工作但移动Safari甚至ul列表中的任何元素.

以下内容适用于桌面Safari和Chrome,但不适用于移动版本.有任何想法吗?

JS:

$('#SubCategories > li .likeRibbon').live('click', function () {
   ......
});
Run Code Online (Sandbox Code Playgroud)

HTML:

<ul id="SubCategories">
      <li id="st2" >          
       <div class="likeRibbon">Like?</div>
      </li>
</ul>
Run Code Online (Sandbox Code Playgroud)

CSS:

#SubCategories .likeRibbon
{
    border-style: solid none solid none;
    border-width: 1px 0px 1px 0px;
    border-color: #565656;
    background-color: #565656;
    color: #333;
    text-shadow: 0 1px 0 #777, 0 -1px 0 black;
    line-height: 1;
    padding: 2px 0 5px 0;
    -moz-transform: rotate(-40deg);
    -ms-transform: rotate(-40deg);
    -o-transform: rotate(-40deg);
    -webkit-transform: rotate(-40deg);
    text-align: center;
    vertical-align: baseline;
    position: absolute;
    width: 100px;
    right: -35px;
    bottom: 5px; …
Run Code Online (Sandbox Code Playgroud)

jquery android mobile-safari css3 jquery-mobile

9
推荐指数
2
解决办法
8726
查看次数

标签 统计

android ×1

css3 ×1

jquery ×1

jquery-mobile ×1

mobile-safari ×1