Posts

Showing posts with the label bootstrap

hide left sidebar and header on window load in AdminLTE theme

paste below code in header or footer  to apply on all pages else paste in particular pages. $(window).on('load',function(){ $("#header-wrap").hide();   $('body').addClass('header-collapsed');   $(".arrow-icon").toggleClass("open");     //leftsidebar collapsed or minisidebar $("body").addClass('sidebar-collapse'); })

uncheck radio button on second click jquery

<div class="col-md-3">   <div class="form-group" >     <label for=" " class="ProLabel1">Stage</label>     <div class="ProInput1">       <input type="radio" onclick="preshow()" name="prepost"    value="pre" >Pre Chargesheet       <input  type="radio" onclick="postshow()" name="prepost" value="post">Post Chargesheet     </div>   </div> </div> <script> $(function(){     $('input[name="prepost"]').click(function(){         var $radio = $(this);         // if this was previously checked         if ($radio.data('waschecked') == true)         {             $radio.prop('checked', false);             $radio.data('waschecked', false);         }   ...

Show/Hide DIV onRadio Buttons

<div class="container"> <p>Click to open div on radio button  </p>   <label class="radio-inline"><input type="radio" name="tab" value="igotnone" onclick="show1();" /> None</label>   <label class="radio-inline"><input type="radio" name="tab" value="igottwo" onclick="show2();" /> Two</label> <div id="div1" class="hide">   <hr><p>Okay Cool! Here is the DIV1...</p> <div class="card" style="width:400px">     <img class="card-img-top" src="https://www.w3schools.com/bootstrap4/img_avatar1.png" alt="Card image" style="width:100%">     <div class="card-body">       <h4 class="card-title">John Doe</h4>       <p class="card-text">Some example text...

How to clear all input fields and error messages in bootstrap modal when clicking data-dismiss button?

 $(document).ready(function(){     $('.modal').on('hidden.bs.modal', function (e) {       $(this)       .find(" input[type=text], textarea,select").val('').end()         .find("input[type=checkbox], input[type=radio]").prop("checked", "").end()         /*remove error field when modal close     */         .find(".has-error").removeClass("has-error").end()     .find(".has-success").removeClass("has-success").end()     .find(".FeRror").empty().end();         })     })

How to Add Bootstrap to an Angular CLI project

Image
Although the setup seems simple, I still get a lot of questions on how to setup an Angular project generated with Angular CLI with Bootstrap. So let’s see the step by step in the sections below. 1: Creating an Angular project with Angular CLI The first step is creating your Angular project using  Angular CLI . For this example we will use the following command: ng new angular-bootstrap-example 2: Installing Bootstrap from NPM Next, we need to install Bootstrap. Change the directory to the project we created ( cd angular-bootstrap-example ) and execute the following command: For Bootstrap 3: npm install bootstrap@3.3.7 For Bootstrap 4: npm install bootstrap 2.1: Alternative: Local Bootstrap CSS As an alternative, you can also download the Bootstrap CSS and add it locally to your project. I donwloaded Bootstrap  from the website  and created a folder  styles  (same level as  styles.css ):  Don’t place your local CS...