diff --git a/bootstrap_library.module b/bootstrap_library.module
index 6583d3a..b6a278a 100644
--- a/bootstrap_library.module
+++ b/bootstrap_library.module
@@ -31,10 +31,9 @@ function bootstrap_library_requirements($phase) {
         'severity' => REQUIREMENT_ERROR,
       );
     }
-    // Check if the site is running >= jQuery 1.7
+ // Check if the site is running >= jQuery 1.7
     $library = drupal_get_library('system', 'jquery');
-    preg_match('/^(\d+)\.(\d+).*$/', $library['version'], $matches);
-    if ( floatval($matches[1] .'.'. $matches[2]) >= 1.7) {
+    if ( version_compare($library['version'], '1.7', '>=')) {
       $requirements['boostrap_library_jquery'] = array(
         'title' => t('Bootstrap version'),
         'value' => t('jQuery @version', array('@version' => $library['version'])),
