Welcome Guest, Not a member yet? Register   Sign In
Bootstrap typeahead
#1

[eluser]joe.afusco[/eluser]
Not sure why codeigniter would be causing the issue, but I might as well ask. Trying to set up typeahead, and I have it working outside of CodeIgniter. When I stick this code:

Code:
<div class="well">
  &lt;input type="text" class="span3" id="typeahead" data-provide="typeahead"&gt;
</div>

[removed][removed]
[removed][removed]
[removed]
  $(function() {
   $("#typeahead").typeahead({
    source: ["YouTube", "Google", "Facebook"]
   });
  });
[removed]

in the body of my page, it doesn't work, but when I try it in its own page, it works fine. any idea on why this wouldn't work?
#2

[eluser]PhilTem[/eluser]
Did you load all required JS-Files in your &lt;head&gt;-part? And do they all lead to a valid URL? Check it by clicking the link in the source-viewer, if you get a 404 they're not set up correctly.

It may only be such a problem since CI doesn't really change how your code is being parsed (which also means any error you type will just be feed through to be client's browser Wink )
#3

[eluser]joe.afusco[/eluser]
Ah. Was directing to the wrong js file. Thanks.




Theme © iAndrew 2016 - Forum software by © MyBB