我对Jquery很新.我想我的Wow.js动画可以运行不止一次.例如:我滚动到我的页面底部,看到所有的动画,如果我滚动回到顶部,我再次看到动画,如向下滚动.我希望我解释自己.我已经看过许多网站在他们的网页上重复动画,但不幸的是我不记得它们,我无法提供链接.
我已经尝试过了:
$(window).scroll(function(){
new WOW().init();
}
Run Code Online (Sandbox Code Playgroud)
但是如果你滚动一点,它也重复动画,看起来很难看.我试着更好地解释一下:我有一个我的动画,如果它是聚焦动画被触发,那么我向下滚动到另一个div而前一个div不再可见(不在窗口视口中),然后再滚动用动画回到我的div,再次触发动画.
对于这个混乱的问题,我很抱歉,但我真的不知道如何解释它.
提前致谢!
我正在尝试为我的ScanFragment实现一个WifiScanner侦听器,但我收到了这个错误:java.lang.ClassCastException: emilsoft.wifitest3.MainActivity cannot be cast to emilsoft.wifitest3.WifiScanner$Listener
我已经用正常的活动做了这个,现在我正在尝试将它转换为片段,我正在学习它们.我做了很多研究,但找不到合适的解决方案.我已经评论了存在错误的代码
所以我的主要活动:
private SectionsPagerAdapter mSectionsPagerAdapter;
private ViewPager mViewPager;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
// Create the adapter that will return a fragment for each of the three
// primary sections of the activity.
mSectionsPagerAdapter = new SectionsPagerAdapter(getSupportFragmentManager());
// Set up the ViewPager with the sections adapter.
mViewPager = (ViewPager) findViewById(R.id.container);
mViewPager.setAdapter(mSectionsPagerAdapter);
TabLayout tabLayout = (TabLayout) findViewById(R.id.tabs);
tabLayout.setupWithViewPager(mViewPager);
}
Run Code Online (Sandbox Code Playgroud)
我的SectionsPagerAdapter类: …