treehouse : what would you like to learn today?
Web Design Web Development iOS Development

Twitter Bootstrap for Wordpress (bootstrap.js not working)

  • hi,

    i am creating a template for wordpress using twitter bootstrap, but it looks wordpress does not like it.

    i cannot access any functions from the bootstrap.js

    does anyone know, how to fix this ?

    thanks for any help.

  • I need more info to troubleshoot this, but I am going to start you out with: http://digwp.com/2011/09/using-instead-of-jquery-in-wordpress/

    Wordpress is set up so that jQuery has to use the word "jQuery" instead of the dollar sign. So instead of

    $(whatever.whatever()

    it is

    jQuery(whatever.whatever()

    This is a Wordpress thing, not a bootstrap thing. Give this a try and post back here if you want more help.

  • hi,

    well, i tried doing jQuery("#myModal").modal(),

    but it ends up saying .modal() is not a function, i thought this might be an error , i tried replacing all $ with jQuery, but did not work.

    currently i get an error log in console .

    TypeError: $ is not a function [Break On This Error]

    $(function () {

    Line 23 - bootstrap.js

    i tried replacing all $ on bootstrap but no success. i will still have a look and post here, if i need more help, thanks anyways.

  • (http://metro.amitashokkamble.com/ "Experiment")

    This is what i've been working lately and if you click on personalise icon at bottom, a modal window appears, now this modal uses styles from bootstrap but not the modal() - function.

    so, i want to use modal function instead.

    This is an experiment to create windows 8 interface and is still being built. hopefully should be a success.

    Thanks again.