weixin_33688840 2016-07-12 22:50 采纳率: 0%
浏览 25

车把上的悬停效果

I have a handlebars template that loop through users in tables:

    <script type ="mustache/x.tmpl" id="helloTmpl">

    {{#.}}
        <table class="torben">
            <tr>   
                <th>
                    {{user}}
                </th>
            </tr>
            <tr>   
                <th>
                    <div id="a1"> More Info </div>
                    <div class="contenthover">
                        More {{content}} here.
                    </div>
                </th>
            </tr>
        </table>
    {{/.}}

    </script>

Moreover I have script containing the hover effect:

    $(document).ready(function()
    {
        $('#a1').contenthover({
        overlay_background:'#000',
        overlay_opacity:0.8
        });
    });

and ofcourse some css, bootstrap, jquery.contenthover.js and AJAX module, and so on. The problem is that the above hover effect doesn't work! If I pull out

              <div id="a1"> More Info </div>
              <div class="contenthover">
                  More {{content}} here.
              </div>

from the loop and put it in plain html, the hover effect works great (without the {{content}} though), but not in the template where I have the ability to run through data so that {{content}} should be displayed. I have hard time figuring out a solution for this. Any suggestions? Thanks

  • 写回答

1条回答

      报告相同问题?

      相关推荐 更多相似问题

      悬赏问题

      • ¥15 android freedom
      • ¥15 使用自定义的类型代替内置类型可行吗
      • ¥15 关于STM32的SPI和ENDAT接口编码器通信的问题
      • ¥15 关于#pdfbox#生成的PDF文件正常,转图片中文乱码的问题,如何解决?
      • ¥15 ADS中有关DAC控件的使用问题
      • ¥15 win11如何运行geoserver
      • ¥15 审稿意见请教-用ERNIE进行小样本分类的对比实验问题
      • ¥15 gem5搭建arm v8
      • ¥15 安卓时间管理APP,怎么做
      • ¥15 这段有什么bug 为什么总报错