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)

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 comment