Cybercrux

Everything is achievable through technology

Bootstrap

 

Best reference link

Tab selection

  • $('#myTab a[href="#profile"]').tab('show'); // show tab targeted by the selector
  • $("#myTab a:first").tab('show'); // show first tab
  • $("#myTab a:last").tab('show'); // show last tab
  • $("#myTab li:eq(2) a").tab('show'); // show third tab (0-indexed, like an array)
Advertisements

2 thoughts on “Bootstrap

  1. Droupdown JS function

    $(‘#the-dropdown’).click(function () {
    if($(this).hasClass(‘open’)) {
    alert(‘it works’);
    }
    });

  2. $(document).ready(function() {

    $(‘#dropdown’).data(‘open’, false);

    $(‘#dropdown-button’).click(function() {
    if($(‘#dropdown’).data(‘open’)) {
    $(‘#dropdown’).data(‘open’, false);
    update_something();
    } else
    $(‘#dropdown’).data(‘open’, true);
    });

    $(document).click(function() {
    if($(‘#dropdown’).data(‘open’)) {
    $(‘#dropdown’).data(‘open’, false);
    update_something();
    }
    });

    });

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s