title: ERROR:TypeError: $(...).selectpicker is not a function loaded library using requirejs
body: <p>ERROR:TypeError: $(...).selectpicker is not a function errors occurred when first time open web application.</p>
  
  <p>In my app.js</p>
  
  <pre>
  requirejs.config({
      baseUrl: '',
      paths: {
          "jquery": "js/jquery",
          "jquery-ui": "js/jquery-ui",
          text: "lib/text",
          //"css": "css",
          handlebars: 'js/handlebars',
          moment: "js/moment.min",
          bootstrap: 'js/bootstrap.min',
          somtjquery: 'widgets/somt/js/somtjquery',
          bootstrapselect: 'js/bootstrap-select',
          utils: 'widgets/somt/js/utils',
          filterwidget: 'widgets/somt/js/filterwidget'
      },  
      shim: {
          handlebars: {
              exports: 'Handlebars'
          },
          'bootstrap': {
              deps: ['jquery']
          },
          //'bootstrapdatepicker':{deps: ['jquery','bootstrap']},
          'somtjquery': {
              deps: ['jquery', 'utils', 'bootstrap']
          },
          'bootstrapselect': {
              deps: ['jquery', 'bootstrap']
          },
          'jquery': {
              exports: '$'
          },
          "datepicker": {
              deps: ["jquery-ui", "bootstrap"],
              exports: "$.fn.datepicker"
          },
          'tooltip': {
              deps: ['jquery'],
              exports: '$.fn.tooltip'
          },
          'filterwidget': {
              deps: ['jquery', "jquery-ui", "bootstrap", "bootstrapselect"],
              exports: 'filterwidget'
          }
      }
  });
  
  In filterwidget.js
  
  define(["handlebars",'hbs!widgets/somt/templates/pfilter'],function(Handlebars,filter){
      var selector = "#somt-filter-area";
      $(selector).html(filter);
      $(function selectDatePicker() {
          try {
              $(selector).find('.selectpicker').selectpicker();
          } catch (e) {
              console.log("Date select err message : " + e);
          }
          try {
              $(selector).find("#week").datepicker({
                  showOn: "button",
                  buttonImage: "images/common-calendar-month-glyph.svg",
                  buttonImageOnly: true,
                  firstDay: 1,
                  beforeShowDay: function(date) {
                      return [date.getDay() === weekofday, ""];
                  },
                  dayNamesMin: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
                  maxDate: currentcutoffday,
                  dateFormat: 'mm/dd/yy'
              });
          } catch (e) {
              console.log("Date picker err message : " + e);
          }
      });
  });
  </pre>
  
  <p>Especially i got the error in Firefox 36 and below version</p>