- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在尝试使用 Materialize ( http://materializecss.com/scrollspy.html ) 中的滚动 spy 来定位使用 ng-repeat 创建的每个 div。
但是,在我看来,scrollspy
类似乎没有执行任何操作。 DOM 不会滚动到页面的该部分,而是会重新加载并指向页面的该部分。
另一个问题是使用 href="/#community#sharingLove"
会更改网站 URL。无论如何,scrollspy 是否可以在不添加 URL 的情况下工作?
<div class="full-height row" ng-controller="CommunityController">
<div class="col l10 main-content">
<div ng-repeat="principle in acmPrinciples" id ="{{principle.id}}" class="row full-width centering-text section scrollspy">
<div class ="col-md-12">
<h4>{{principle.title}}<h4>
</div>
<div class ="col-md-12 comm-description-container">
<p class="paragraph-style larger-font-size">
{{principle.description}}
</p>
</div>
<div class ="col-md-12">
<video class="responsive-video comm-video-height" controls>
<source ng-src="{{principle.videoURL}}" type="video/mp4">
</video>
</div>
</div>
</div>
<div class="col l2 scroll-content">
<div class="row">
<div class="col hide-on-small-only m3 l2 scroll-items">
<ul class="section table-of-contents">
<li><a href="#/community#experiencingGod">Experiencing God</a></li>
<li><a href="#/community#sharingLove">Sharing Love</a></li>
<li><a href="#/community#conntectingLives">Connecting Lives</a></li>
<li><a href="#/community#declaringTruth">Declaring Truth</a></li>
</ul>
</div>
</div>
</div>
</div>
我已经链接了 jQuery、bootstrap 和 Materialize。最后一件事:物化的其他功能对我有用,但滚动 spy 除外。我也这么做
$(document).ready(function(){
$('.scrollspy').scrollSpy();
});
最佳答案
我认为如果您从 href 中删除 #/community ,它应该可以工作。 href 应包含 block 的 id,而不是额外的 url 信息。例如尝试使用
<a href="#experiencingGod">Experiencing God</a>
关于javascript - Scrollspy for Materialise 根本不使用 Angularjs 滚动,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34999638/
我遇到了一个似乎很独特的问题。我的 NSUbiquitousKeyValueStore 在模拟器中的启动之间根本不起作用。也就是说,我什至不是在谈论 iCloud 同步或类似的东西,我无法让它通过下面
首先,我使用的是 WiX 版本 3.5.2519.0,但我也在最新的 3.6 版本上测试了它,结果相同。 我很难确定 PatchFamily 究竟能过滤掉 torch 生成的差异的某些部分。按照手册中
我可以获取要呈现的“帮助主题”标题,但无法获取我定义的任何FIXTURES。 {{#each model}} 中的任何内容都不会渲染。这是我第一次使用 Ember,所以任何东西(字面意义上的任何东
我一直在尝试设置custom ajaxTransports for jQuery在我们的产品的某些场景下缩短某些工作流程。然而,我在让这些传输受到尊重方面取得了零成功(而我有很多工作 custom a
为什么纯无类型 lambda 演算经常被描述为无法使用? 有了合适的函数库,它会不会与任何其他函数式语言大致相同? 最佳答案 速度不是大问题。例如,您可以决定使用教堂数字但优化实现,以便像往常一样表示
我是一名优秀的程序员,十分优秀!