Add jQuery function to specific elements

前端 未结 9 1490
悲&欢浪女
悲&欢浪女 2020-12-07 18:56

I know that you can add new jQuery functions by $.fn.someFunction = function()

However, I want to add functions to specific elements only. I tried this

9条回答
  •  萌比男神i
    2020-12-07 19:23

    I'm not also sure with my answer if this will help you but just a try how about using .live?

    $(selector).live(click,function(){
        //some codes here
    });
    

提交回复
热议问题