Check if collapsible("collapse") exists

Check if collapsible("collapse") exists

Hi

I am migrating a framework from jQuery Mobile 1.3.2 to 1.4.2.
I want to be able to switch between 1.3 and 1.4 in the same framework, so I need to use feature detection.
The problem is, I don't know how to check if the collapsible() method supports the collapse/expand values.
Is it possible to check this, so I cann differ between 1.3 and 1.4?

Here's a bit code what I've done until now to distinguish between 1.3 and 1.4:

var coll = $("#" + id);

if (typeof(coll.collapsible) === "function")
coll.collapsible("expand");
else
coll.trigger("expand");