Add Border to Table with Bootstrap

Chandu yadav
Updated on 12-Jun-2020 13:18:11

754 Views

To add border to a table, use the table-bordered class. You can try to run the following code to implement the table-bordered class −ExampleLive Demo           Bootstrap Table                                                Footballer Rank                                      Footballer                Rank                Country                                                            Messi                1                Argentina                                        Neymar                2                Brazil                                        Ronaldo                3                Portugal                                

Bootstrap Input Group Small Class

George John
Updated on 12-Jun-2020 13:16:57

213 Views

To make small input group, use the input-group-sm.You can try to run the following code to implement the input-group-sm class in Bootstrap −ExampleLive Demo           Bootstrap Example                                                                      $                                                

Best Way to Break from Nested Loops in JavaScript

Jennifer Nicholas
Updated on 12-Jun-2020 13:16:07

1K+ Views

The best way to break from nested loops is to use labels. A label can be used with break and continue to control the flow more precisely. A label is simply an identifier followed by a colon (:) that is applied to a statement or a block of code.ExampleYou can try to run the following code to implement Label with a break statement to break from nested loops −Live Demo                    document.write("Entering the loop! ");          outerloop:  // This is the label name          for (var ... Read More

Create a div Element in jQuery

Nizam Techs
Updated on 12-Jun-2020 13:15:44

1K+ Views

They are many way to add a div using jquery , but as the requirement says  on click of any square we have to addd a div.  The following code below will help in adding a div on click Click on any square below to see the result                               $(".div").on("click",function(){ $('#box').append(   $('')     .attr("id", "newDiv1")     .addClass("div")     .append("")       .text("hello world")     ); });

Add Denser Information to a Table with Bootstrap

Ankith Reddy
Updated on 12-Jun-2020 13:13:44

213 Views

Use the .table-condensed class, add denser information to a table.You can try to run the following code to implement a table-condensed class in Bootstrap −ExampleLive Demo           Bootstrap Table                                                Footballer Rank                                      Footballer                Rank                Country                                                            Messi                1                Argentina                                        Neymar                2                Brazil                                        Ronaldo                3                Portugal                                

Methods to Provide Effects in jQuery

David Meador
Updated on 12-Jun-2020 13:09:08

912 Views

jQuery effect methods are used to create custom animation effects. The following are some of the methods used to provide effects in jQuery −S.NoMethodDescription1animate()Custom animation on the selected elements2clearQueue()To remove remaining queued functions from the selected elements3delay()To set a delay for all queued functions on the selected elements4dequeue()To remove the next function from the queue, and then executes the function5fadeIn()Fades in the selected elements6fadeOut()Fades out the selected elements7fadeTo()Fades in/out the selected elements to a given opacity8fadeToggle()To Toggle between the fadeIn() and fadeOut() methods9finish()To stop, remove and complete all queued animations for the selected elementsLet’s see an example to work with ... Read More

Print Date in Regular Format in Python

Rajendra Dharmkar
Updated on 12-Jun-2020 13:07:55

2K+ Views

If you print the dates directly using a print function, you'd get regular dates,  Exampleimport datetime today = datetime.date.today() print(today)OutputYou will get the output −2018-1-2which is exactly what you want. But when you append this to a list and then try to print it,   Exampleimport datetime my_list = [] today = datetime.date.today() my_list.append(today) print(my_list)OutputYou will get the output −[datetime.date(2018, 1, 2)]This is happening because datetimes are objects. Therefore, when you manipulate them, you manipulate objects, not strings, not timestamps nor anything. Any object in Python have TWO string representations. The regular representation that is used by "print", can be get ... Read More

Find Anchor Tag in Div and Add Class Using jQuery

Ricky Barnes
Updated on 12-Jun-2020 13:02:21

3K+ Views

To find anchor tag in div, use a selector and the addClass() method adds a class using jQuery.You can try to run the following code to learn how to find anchor tag in div and add class:Live Demo                          $(document).ready(function(){            $("#button1").click(function(){              $('#div1 a').addClass('myclass');            });         });                                 .myclass {              font-size: 25px;            }                                  Demo                      This is demo text.             Click    

Bootstrap Contextual Classes

Arjun Thakur
Updated on 12-Jun-2020 12:53:55

2K+ Views

The Bootstrap Contextual Class allows you to change the background color of your table rows or individual cells.The following are the classes −ClassDescription.activeApplies the hover color to a particular row or cell.successIndicates a successful or positive action.warningIndicates a warning that might need attention.dangerIndicates a dangerous or potentially negative actionExampleThe following is an example of the active class −ExampleLive Demo           Bootstrap Table                                                                      Subject                Marks                Student                                                            Maths                90                Amit                                        Science                80                Aman                                        English                85                Rahul                                

Get Selected Text from Drop Down List using jQuery

Ricky Barnes
Updated on 12-Jun-2020 12:50:48

1K+ Views

With jQuery, it’s easy to get selected text from a drop-down list with :selected. This is done using the select id. You can try to run the following code to learn how to get selected text from a drop-down list using jQuery −ExampleLive Demo           jQuery Selector                      $(document).ready(function() {             $("#submit").click(function(){                      $("#myselection option:selected").text();                alert( $("#myselection option:selected").text() );             });          });                              The selected value:                   First           Second                 Result              

Advertisements