Creating a jQuery like “$” object

前端 未结 8 1361
伪装坚强ぢ
伪装坚强ぢ 2020-12-08 03:25

My end goal is being able to do something like this:

MyVar(parameter).functionToPerform();

Silly enough, even after reading up on how varia

8条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-08 03:53

    You can pass the 'azerty' value as parameter to MyClass constructor and change the test('azerty').move() to test.move()

    
    

提交回复
热议问题