Plugin Author
Paul
(@paultgoodchild)
Hey,
Thanks for the great feedback, glad you like it.
Yes, this plugin currently has support for all the Twitter Bootstrap JS libraries.
In version 2.0.3 however we have removed support for including each individual library. Instead, we have kept a single option which is include all the JS libraries (as 1 minimised JS file) or none.
This makes future updates and maintenance easier.
And yep, 2.0.3 has full LESS compiler support. It doesn’t have EVERY option, but it has a lot.
Cheers,
Paul.
Thanks Paul for quick response. Looking forward to the update.
Plugin Author
Paul
(@paultgoodchild)
No problem. When Twitter Bootstrap 2.0.3 is out, this plugin update with follow sooner after..
Hey Paul,
Have you tested dropdowns with your plugin? I’m not sure why mine isn’t working, though in jsfiddle it works. Just wanted to make sure it works with plugin.
Plugin Author
Paul
(@paultgoodchild)
The shortcode doesn’t work that we implemented originally… it was never brought up to date with v2.0+ yet
But, dropdowns that you write into you theme, in principle, should work no problem as with the JS included it’s all covered.
Hi Viktorix,
Can you give me a copy of the HTML and JS that you are using for your “dropdowns” (if you’re not using the shortcodes -which haven’t been updated to work with Twitter Bootstrap 2.x yet).
Cheers,
Dave.
Hey Dave,
I appreciate the help. Here’s the code I’m using for dropdown in a fixed navbar.
<ul class="nav pull-right">
<li><a href="/mc/"></a></li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="icon-user icon-white" id="account-icon"></i> <b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="#">Link</a></li>
<li><a href="#">Link</a></li>
</ul>
</li> <form class="navbar-search pull-right" method="get" action="http://projectarmy.net/">
<input type="text" class="search-query span2" id="s" name="s" placeholder="Search">
</form>
</ul>
I’m not sure if I have to use js api for the dropdown, so I tried both, with and without. Still no luck.
Thanks a lot.
Viktor
Victorix,
I’ve setup a brand new install and tried getting the dropdowns working on the “twentyeleven” theme. Sadly I think we made a poor assumption that jQuery is ALWAYS (without question) included by WordPress in all themes. As it turns out “twentyeleven” doesn’t have the jquery library included, therefore it’s impossible to get it to work without modifying your theme. This is far from ideal, so the new version will include the jquery automatically if you select to add the JS library.
This has been of great help to make the plugin better and easier to use for all. Can I just check, does your theme include the jQuery JS library (do a view source on the homepage and look for a <script src=”jquery”> or sorts -sorry, you may know this already, but as I don’t know your WordPress/web experience I’m mentioning this for completeness).
Regards,
Dave.
Hey Dave,
I’m glad I was able to help improve it. Looking through my source code, the only jquery file included by another plugin is “jquery-1.4.4.min.js?ver=3.3.1”
It seems to be outdated, and not sure if the right one for your plugin.
Here’s a link to the dev site, so you can check it out:
projectarmy.net
Though dropdown is not visible for visitors.
Thanks.
Victorix,
I’ve just applied the changes I mentioned above and this fixes the problems as I suspected. I had no joy getting your HTML to work via a straight copy/paste, so I copied the html in full from:
http://twitter.github.com/bootstrap/javascript.html#dropdowns
…this worked as intended.
This fix won’t be available until v2.0.3 (which is fully dependent on the release of Twitter Bootstrap 2.0.3 -I hope you’re ok to wait, but as I understand it shouldn’t be long in coming.
Dave.
Yeah v1.4.4 is considerably outdated. I just checked the bootstrap docs and they state that you do need the latest version.
We _may_ consider including that in the plugin -though I’m not sure on this yet.
D.
Looking forward to the update. I’ll see if I can edit plugin to include updated version of jquery, maybe that will fix the problem.
You might just include it in the installation notes, for the user to make sure they have latest jquery and add it to the theme if they don’t.
Thanks.
Dave,
With the plugin, do I still have to call the api?
$('.dropdown-toggle').dropdown()
Thanks.
If the Bootstrap JS is included, you have the latest jQuery then it should just work because of the:
data-toggle="dropdown"
Regards,
Dave
Oh snap! Just figured it out.
It wasn’t working even with 1.7.2 version of jquery, so I tried placing files into the header by using the option in your plugin. And bam! It works now =)