Monday, November 2, 2015

Detect SharePoint Version using JavaScript:

There is a JS objetc called _spPageContextInfo on that type U can use .webUIVersion property.

In SP 2010, it will return 4, in 2013 it will probably return 15. 2007 might not return anything or throw undefined. 

This allows us to determine SP version from JS :

SP 2010 Example:


 SP 2013 Example

No comments:

Post a Comment