123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- <div class="hot-users" id="userRecommend">
- <!-- 显示热门帖子 -->
- <h3 class="block-head">
- <i class="fa fa-trophy" style="margin-right:10px;font-size: 18px"></i>热门帖子
- <div class="hot-sw">
- <span class="listType" style="margin-right:10px;cursor: pointer" data-type="week">周榜</span>
- <font style="color: #e5e5e5">|</font>
- <span class="act listType" style="margin-left:10px;cursor: pointer" data-type="total">总榜</span>
- </div>
- </h3>
- <!-- END -->
-
- <!-- 周榜 -->
- <ul id="weekList" style="display: none;">
- {eyou:volist name="$eyou.field.WeekList" id="week"}
- <a href="{$week.AskUrl}" target="_blank">
- <li>
- <div class="hot-user-avter">{$key+1}</div>
- <div class="hot-user-info">
- <div class="hot-nice">{$week.ask_title}</div>
- </div>
- </li>
- </a>
- {/eyou:volist}
- </ul>
- <!-- END -->
-
- <!-- 总榜 -->
- <ul id="totalList">
- {eyou:volist name="$eyou.field.TotalList" id="total"}
- <a href="{$total.AskUrl}" target="_blank">
- <li>
- <div class="hot-user-avter">{$key+1}</div>
- <div class="hot-user-info">
- <div class="hot-nice">{$total.ask_title}</div>
- </div>
- </li>
- </a>
- {/eyou:volist}
- </ul>
- <!-- END -->
- </div>
-
- <script type="text/javascript">
- $(function() {
- // 排行榜
- $('.listType').hover(function() {
- $('.hot-sw').find('span').removeClass('act');
- $(this).addClass('act');
- var type = $(this).data('type');
- if ('week' == type) {
- $('#weekList').show();
- $('#totalList').hide();
- } else {
- $('#weekList').hide();
- $('#totalList').show();
- }
- });
- });
- </script>
|