【问题标题】:How to use jquery .on() with jquery plugins(for eg with hoverpulse)?如何将 jquery .on() 与 jquery 插件一起使用(例如使用 hoverpulse)?
【发布时间】:2012-11-08 12:14:19
【问题描述】:

我正在尝试将 .on() 与 hoverpulse 插件一起使用,以将其应用于动态加载的内容,但没有出路。 如果有人可以提供帮助,那将是非常友好的。 提前致谢。

调用悬停脉冲函数的查询代码

$(selector).hoverpulse({

    size: 40,  // number of pixels to pulse element (in each direction)
    speed: 400 // speed of the animation 
})

悬停脉冲功能

$.fn.hoverpulse = function(options) { CODE GOES HERE}

【问题讨论】:

    标签: jquery jquery-plugins jquery-hover jquery-on


    【解决方案1】:

    on 语法用于事件绑定/处理。不适用于插件..

    【讨论】:

    • 那么如何将hoverpulse应用于使用ajax或jquery的getJSON动态加载的内容
    • @Abhinav,从 ajax/getJSON 调用的回调函数中运行 .hoverpulse()
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多