2

I can't get why, but suddenly my Bootstrap Carousel stopped working. I want it starts onload.

Error from Chrome Console:

          Uncaught TypeError: Object [object Object] has no method 'carousel' :3000/assets/application.js?body=1:18
          (anonymous function) :3000/assets/application.js?body=1:18
         jQuery.Callbacks.fire jquery-1.7.2.js:1076
        jQuery.Callbacks.self.fireWith jquery-1.7.2.js:1194
        jQuery.extend.ready jquery-1.7.2.js:436
        DOMContentLoaded jquery-1.7.2.js:950

In my application.js:

        $('.carousel').carousel({
        interval: 2000
       })

In my layout:

       <%= javascript_include_tag 'jquery-1.7.2', 'jquery.validate.min','application' %>

Where is problem ?

Denys Medynskyi
  • 2,353
  • 8
  • 39
  • 70
  • Are you loading bootstrap-carousel.js? – periklis Jun 27 '12 at 08:45
  • all bootstrap files are in my js directory. modals and dropdowns are working. – Denys Medynskyi Jun 27 '12 at 08:49
  • Create a clone of your site [html/js/css] in http://jsfiddle.net, then start debugging from there, also show us the fiddle URL once created so we can collaborate in the debugging process. – Dexter Huinda Jun 27 '12 at 09:00
  • Perhaps the carousel js file hasn't yet loaded? If you're not doing it already, try loading your js files before the actual call to it inside the html – periklis Jun 27 '12 at 09:02

1 Answers1

4

Make sure:

Community
  • 1
  • 1
baptme
  • 10,062
  • 3
  • 52
  • 57