First, try with just the HTML and without any JS: <input type="text" id="ooo" data-provide="typeahead" data-items="3" data-source='["youtube","google","yahoo"]' />
I've got a strange problem: for me, it works just fine this way but it is impossible to make it work with JS, this is driving me crazy... Le jeudi 28 juin 2012 23:08:36 UTC+2, Sherbrow a écrit : > > It may be some other things : > > > - Check that you emptied your cache. > - Check that the files are loaded correctly > - Be sure to include jQuery only once > - Be sure that you include bootstrap only once (bootstrap.min.js > includes all plugins) > - Check the order of inclusion (jQuery first, then bootstrap js > file(s)) > - Check for conflicts with prototype or other frameworks > > Try to reproduce the bug on http://jsfiddle.net > Without code to debug, it's a bit difficult to help you more. > Anyway this is most certainly a jQuery-related problem, not a bootstrap > one. > > On Thursday, June 28, 2012 8:33:35 AM UTC+2, Daniele wrote: >> >> I'm still with the error >> >> >> 1. Uncaught TypeError: Object #<Object> has no method 'on' >> >> bootstrap-typeahead.js:277<http://localhost/adreactor-reports/assets/javascript/bootstrap-typeahead.js> >> >> 1. (anonymous >> function)bootstrap-typeahead.js:277<http://localhost/adreactor-reports/assets/javascript/bootstrap-typeahead.js> >> 2. >> c.extend.readyjquery.js:26<http://localhost/adreactor-reports/assets/javascript/jquery.js> >> 3. L >> >> jquery.js:33<http://localhost/adreactor-reports/assets/javascript/jquery.js> >> >> >> >> i dont know what is happening! >> >> On Wed, Jun 27, 2012 at 10:21 PM, Sherbrow <***> wrote: >> >>> Hello, >>> >>> You need jQuery 1.7 (or a later version). >>> http://api.jquery.com/on/ see the 'version added: 1.7'. >>> >>> >>> On Wednesday, June 27, 2012 2:44:19 PM UTC+2, Daniele wrote: >>>> >>>> Hey people! >>>> >>>> Im starting to work with CodeIgniter and i need to code one >>>> autosuggestion box with bootstrap typeahead and it's not working inside >>>> the >>>> project even with a simple example. >>>> >>>> The example is this one: >>>> >>>> $('#ooo').typeahead({number: 3 , source: ['youtube', 'google', >>>> 'yahoo']}); >>>> >>>> <input type="text" id="ooo" data-provide="typeahead"/> >>>> >>>> And the error: >>>> >>>> $(function () { >>>> $('body').on('focus.typeahead.**data-api', '[data-provide="typeahead"]', >>>> function (e) { >>>> >>>> ---> Uncaught TypeError: Object #<Object> has no method 'on' >>>> >>>> >>>> Someone faced the same problem or at least someone know what is >>>> happening? >>>> >>> >>
