TurboGears / tg2

Python web framework with full-stack layer implemented on top of a microframework core with support for SQL DBMS, MongoDB and Pluggable Applications
http://www.turbogears.org/
Other
806 stars 78 forks source link

bootstrap javascript is broken #39

Closed csmall closed 10 years ago

csmall commented 11 years ago

I was trying to work out why tooltips didnt work in my turbogears application. The problem is that jquery.js is missing. I have included bootstrap.js in but it doesn't work, including jquery.js (from the twitter github site) make it work immediately.

The relevant code from my mako template is here:

<a href="#" rel='tooltip' class="link" data-original-title="first tooltip">Hover me for a tooltip</a>
<script src="${w.url('/javascript/jquery.js')}"></script>
<script src="${w.url('/javascript/bootstrap.min.js')}"></script>
<script>
$('[rel=tooltip]').tooltip()
</script>

Removing that line mentioning jquery.js makes the tooltip stop working.

amol- commented 11 years ago

By default no javascript is used by TurboGears, the bootstrap.js is provided only to facilitate people that want to use full bootstrap. In such case, as stated on the bootstrap documentation, you should provide jQuery yourself, probably through the jquery cdn.

amol- commented 10 years ago

Closing as now the quickstart provides by default link to JQuery through the jQuery CDN since https://github.com/TurboGears/tg2devtools/commit/5b9dae0e7e329c2223f739803eb8c52a12ab77a9