0

I am trying to use Foundation tooltip for a project. The project is under Yii framework.

At the end of the body, I added the jQuery, Foundation JS, and initialize Foundation.

<script src="<?php echo Yii::app()->request->baseUrl; ?>/js/vendor/jquery.js"></script>

<script src="<?php echo Yii::app()->request->baseUrl; ?>/js/foundation.min.js"></script>

<script>
  $(function(){
    $(document).foundation();    
  })
</script>

Then I added the generic HTML class

<span data-tooltip class="has-tip" title="Tooltips are awesome, you should totally use them!">extended information</span>

The result is just a simple generic browser tooltip.

All other Foundation javascript features doesn't work either, reveal, dropdown, etc... The only thing that works is orbit.

Not sure what I'm doing wrong here.

4

3 回答 3

0

我通过包含 custom.modernizr.js(在基础脚本之前)解决了这个问题

于 2013-10-31T12:05:35.010 回答
0

您需要将foundation.css 链接到您的页面。

于 2013-08-16T04:59:21.403 回答
0

将所有脚本移动到 HTML 文件的末尾,就在正文结束之前

于 2014-09-29T21:15:31.093 回答