Closed Yustie closed 10 years ago
You need to initialize tooltip on the page load. The code to do so is in the BMVC's js file. Is it referenced on your page?
Thank You, Dmitry
On Sat, Nov 30, 2013 at 6:52 AM, Yustie notifications@github.com wrote:
Hi,
The tooltip doesn't show up no matter what I try. Here 2 of my many tries:
@Html.Bootstrap().TextBoxFor(x => x.Country).TypeAhead(new TypeAhead().Controller("Home").Action("GetCountries").MinLength(1)) .Id("CountryId") .Tooltip(new Tooltip("Detailed Tooltip") .Animation(true) .Delay(400) .Placement("top") .Trigger("hover click") .Container("countryGroup"))
2nd:
@Html.Bootstrap().TextBoxFor(x => x.Country).TypeAhead(new TypeAhead().Controller("Home").Action("GetCountries").MinLength(1)) .Id("CountryId") .Tooltip("testttt")
— Reply to this email directly or view it on GitHubhttps://github.com/DmitryEfimenko/TwitterBootstrapMvc/issues/171 .
This file right: https://www.twitterbootstrapmvc.com/Scripts/TwitterBootstrapMvcJs-3.0.1.js ? I have it referenced yes.
I just tested this. It works as expected. You probably have some javascript error somewhere. Do you see any errors in console of the browser? If you do, fix them.
Thank You, Dmitry
On Sat, Nov 30, 2013 at 4:32 PM, Yustie notifications@github.com wrote:
This file right: https://www.twitterbootstrapmvc.com/Scripts/TwitterBootstrapMvcJs-3.0.1.js? I have it referenced yes.
— Reply to this email directly or view it on GitHubhttps://github.com/DmitryEfimenko/TwitterBootstrapMvc/issues/171#issuecomment-29563670 .
After trying many things I finally got it working. I was messing around with the order of the jquery files that are being loaded.
The jqeury files where already loaded before any of the BMVC scripts where loaded. But it seems that the jquery files needs to be loaded before the twitter bootstrap scripts as well:
<script src="http://ajax.aspnetcdn.com/ajax/jquery.validate/1.11.0/jquery.validate.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js"></script>
<script src="//netdna.bootstrapcdn.com/bootstrap/3.0.2/js/bootstrap.min.js"></script>
This fixed it for me. Make sure you clear your cache too.
Side note: I got the main jquery 2.0.3 loaded in a bundle. That one gets loaded before any other script.
Yes, indeed. I remember this issue has bitten me once too. It's a shame I didn't think this could be an issue in your case. Glad you figured it out!
Thank You, Dmitry
On Sun, Dec 1, 2013 at 4:39 AM, Yustie notifications@github.com wrote:
After trying many things I finally got it working. I was messing around with the order of the jquery files that are being loaded.
The jqeury files where already loaded before any of the BMVC scripts where loaded. But it seems that the jquery files needs to be loaded before the twitter bootstrap scripts as well:
This fixed it for me. Make sure you clear your cache too.
Side not: I got the main jquery 2.0.3 loaded in a bundle. That one gets loaded before any other script.
— Reply to this email directly or view it on GitHubhttps://github.com/DmitryEfimenko/TwitterBootstrapMvc/issues/171#issuecomment-29572019 .
This should be added to the docs. Its a nasty bug to fix if you don't know where to look for it.
Hi,
The tooltip doesn't show up no matter what I try. Here 2 of my many tries:
@Html.Bootstrap().TextBoxFor(x => x.Country).TypeAhead(new TypeAhead().Controller("Home").Action("GetCountries").MinLength(1)) .Id("CountryId") .Tooltip(new Tooltip("Detailed Tooltip") .Animation(true) .Delay(400) .Placement("top") .Trigger("hover click") .Container("countryGroup"))
2nd:
@Html.Bootstrap().TextBoxFor(x => x.Country).TypeAhead(new TypeAhead().Controller("Home").Action("GetCountries").MinLength(1)) .Id("CountryId") .Tooltip("testttt")