Implementing jQuery's shake effect with animate

前端 未结 9 2466
迷失自我
迷失自我 2020-12-14 10:38

I\'ve been given a cut down subset of the jQuery lib one of the key features I\'m missing is the .effect functions. I do however have .animate. I w

9条回答
  •  时光说笑
    2020-12-14 11:18

    This is probably irrelevant now but I've ported jQ UI's shake effect as a standalone jQuery plugin. All you need is jQuery and it will work exactly like the one provided in jQ UI.

    For those who want to use the effect without actually bloating their project with unnecessary jQ UI core files.

    $('#element').shake({...});

    It can be found here with instruction: https://github.com/ninty9notout/jquery-shake

    Thought I'd leave this here for future reference.

提交回复
热议问题