From 615bd7e1c0766266118672f23e90b45272bc1a71 Mon Sep 17 00:00:00 2001 From: "Theme.al" Date: Thu, 20 Apr 2017 09:56:08 +0200 Subject: [PATCH] Update README.md In conduction with this issue https://github.com/select2/select2-bootstrap-theme/issues/64 --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index c85bde3..43b80ab 100755 --- a/README.md +++ b/README.md @@ -52,7 +52,9 @@ $( "#dropdown" ).select2({ You may also set it as the default theme for all Select2 widgets like so: ```js -$.fn.select2.defaults.set( "theme", "bootstrap" ); +if ($.fn.select2) { + $.fn.select2.defaults.set( "theme", "bootstrap" ); +} ``` #### Changelog