2012-04-12 24 views

Antwort

2

können Sie den instanceof-Operator verwenden:

obj instanceof jQuery 

Also, Ihr Code geht so:

function func(obj) { 
    if (!(obj instanceof jQuery)) { 
     obj = $(obj); 
    } 
    // ... 
} 
Verwandte Themen