`
karaschee
  • 浏览: 15060 次
  • 性别: Icon_minigender_1
  • 来自: 四川
社区版块
存档分类
最新评论

【phenomenon】onscroll事件绑定

阅读更多

情况:

 

$(function){
window.onscroll = test;
var test = function(){alert(1)};
}

 

这样的代码在滚动页面时 是不会执行的。

 

解决:

1.var test = function(){alert(1)};改为function test(){}

2.将test移到外面作全局变量

 

$(function){
window.onscroll = test;
}

var test = function(){alert(1)};
 
分享到:
评论

相关推荐

    Phenomenon一个快速的2kB低层WebGLAPI基于GPU的着色器

    Phenomenon是一个轻量级且高效的WebGL库,其大小仅为2kB,专注于底层图形处理,特别是基于GPU的着色器。WebGL是一种在浏览器中实现交互式三维图形的标准,它利用了GPU的能力来加速图形渲染。在这个库中,开发者可以...

    Ringing phenomenon in silica microspheres

    Ringing phenomenon can be observed with high frequency sweeping speed. The thermal nonlinearity in the microsphere can enhance this phenomenon. Our measurement results agree very well with the ...

    Auto_Fibo_Phenomenon_fibo_Fibonacci_FXProsystems_mt4_

    FXProsystems开发的"Auto Fibo Phenomenon"是一款专为MetaTrader 4(MT4)交易平台设计的自动斐波那契指标,旨在帮助交易者更准确地捕捉市场机会。 斐波那契序列是由意大利数学家列奥纳多·斐波那契提出的一种数字...

    HW1.rar_Eigenfunction_Gibbs_The Other_gibbs phenomenon_ringing

    The Gibbs phenomenon is an overshoot (or "ringing") of Fourier series and other eigenfunction series occurring at simple discontinuities.

    Phenomenon Engine-开源

    Phenomenon Engine是一款专为Free Pascal编程语言设计的开源3D引擎,它提供了一种高效的方式来创建具有先进图形效果的软件渲染器。这个引擎的独特之处在于它利用了多核CPU的并行处理能力,从而在图形渲染方面实现了...

    Steve-+Go+-++a+global+phenomenon.pdf

    标题中的"Steve-+Go+-++a+global+phenomenon.pdf"暗示了这份文档是关于Go编程语言的全球影响力和技术发展历程的。描述提到的是一个技术文档分享的情况,表明这是一份可以公开获取的资料,可能包含有关Go语言在不同...

    phenomenon::high_voltage:快速的2kB低级WebGL API

    现象 现象是非常小的,低级的WebGL库,...const phenomenon = new Phenomenon ( options ) ; // Add an instance phenomenon . add ( "particles" , options ) ; 为了更好地了解如何使用该库,请继续阅读或看一下演示

    phenomenon-px::high_voltage:创建像素着色器的最快方法

    Phenomenon-px是创建像素着色器的最快方法。 凭借其简单的API和较小的尺寸,所有精力都集中在您的代码上! 安装 $ npm install --save phenomenon-px 用法 // Import the library import Phenomenon from '...

    phenomenon

    标题“phenomenon”可能指的是一个项目或软件的名称,而描述中的“细微差别很重要”暗示我们关注的焦点是IT领域中对细节的把握和理解。由于没有具体的标签信息,我们将从一般性的IT知识角度出发,结合“日记”这一...

    Phenomenon engine - NG software render-开源

    Phenomenon Engine是一款专注于3D图形渲染的开源软件,其特色在于采用了NextGen增强型图形技术,旨在提供卓越的视觉体验。这款引擎是用Free Pascal编程语言编写的,这表明它利用了Pascal的强大功能来实现高效且复杂...

    THREEPhenomenon围绕threejs构建的高性能WebGL体验

    2. **高级交互**:该框架支持高级用户交互,如手势控制、设备运动感应和自定义事件处理。这使得创建响应式和用户友好的3D应用变得更加简单。 3. **可视化工具**:THREE.Phenomenon提供了强大的数据可视化组件,例如...

    行星现象数据集.zip

    9. **phenomenon_uranus.csv**:天王星的数据可能涵盖其稀有的冲日事件,以及其环系和卫星的动态。 10. **phenomenon_saturn.csv**:土星的数据可能包括土星光环的演变、土星卫星的运动,特别是土卫六上的冰火山和...

    Non-blow-up phenomenon for the Cahn-Hilliard equation with non-constant mobility

    具非常数迁移率的Cahn-Hilliard方程的不爆破现象,黄锐,尹景学,在本文中, 我们证明对于具非常数迁移率和反双井位势的Cahn-Hilliard方程的解的有限时刻爆破的现象可能不会发生, 这与具常迁移率的情形�

    phenomenon:所见即所得的 Markdown 编辑器

    现象Phenomenon 是用于Markdown文件的开源桌面WYSIWYG editor 。 它是用Qt 5构建的,渲染机制来自C库 - Hoedown 。 请注意,在当前状态下, phenomenon不可用。界面执照请参阅LICENSE 。 使用的组件及其许可证列表:...

    Optical switch phenomenon in a self-defocusing medium

    A spatial optical switch phenomenon caused by the induced focusing of a weak probe beam occurring in self-defocusing nonlinear media is discussed theoretically. A weak beam is induced to focus when it...

    Ringing phenomenon in a high-Q fiber bottle microresonator

    A tunable continuous-wave laser is used to excite whispering-gallery modes in a bottle microresonator through a fiber taper, and a ringing phenomenon is observed. The observed ringing phenomenon is ...

    2010大学英语四级 作文预测30篇

    Nowadays it is a very common phenomenon that some university students are late for or even absent from classes. And still there are some students who slip out of the classroom before the class is over...

    ‘Periodically-active phenomenon’ of DIS-NCS with scattering transformation

    staircase phenomenon' in its dynamic response has been discovered and proven to be an intrinsic problem, which can only be eliminated by changing the system's traditional feedback structure. ...

Global site tag (gtag.js) - Google Analytics