JavaScript Anonymous Method -



JavaScript Anonymous Method -

hi building little simple js framework university. having issues doing jquery.

currently can phone call methods $.method() struggling on how $().method() have looked @ source , can't seem work out how achieved it. every time seek adapt mine theirs not work.

so best way accomplish this.

function $() { homecoming object.create(proto); } $.method = function method() { ... }; proto.method = function method() { ... }; $.method(); $().method();

so have function properties methods , function returns object has methods.

also pro tip, $ poor variable name, utilize more meaningful.

javascript

Comments

Popular posts from this blog

How do I check if an insert was successful with MySQLdb in Python? -

delphi - blogger via idHTTP : error 400 bad request -

postgresql - ERROR: operator is not unique: unknown + unknown -