How do I check what version of twitter bootstrap is loaded?

Viewed 1503

I'm building a script (and HTML) that people can embed in their website that adds a form to join our application.

I want to design it using bootstrap but i'm afraid of conflicts.

I know i can check if bootstrap is loaded using:

typeof $().modal == 'function'

Is there a way to check the version of bootstrap that is currently loaded?

I was thinking of the following algorithm for building the form:

No bootstrap => load bootstrap and bootstrap HTML

Bootstrap version 3.x => load bootstrap HTML

Bootstrap version other than 3.x => load regular HTML form

If there's no way of checking the version (maybe using "v3.x only" functions), i would appreciate other ideas

Thanks

1 Answers
Related