// var = {hey: "baby"}; // or // var = $('#thingy'); if(typeof var == 'object'){ // this is true for both =( }
I need my code to be smart enough to be able to talk about the difference between the two. What is the best way to do this?
You can use the instanceof operator to do this.
obj instanceof jQuery
Also, I don't think you want to use "var" as the variable name. It is reserved for setting a variable area.