Rishi Rathor has Published 142 Articles

Why are parenthesis used to wrap a JavaScript function call?

Rishi Rathor

Rishi Rathor

Updated on 16-Jun-2020 11:12:24

4K+ Views

In JavaScript, the functions wrapped with parenthesis are called “Immediately Invoked Function Expressions" or "Self Executing Functions.The purpose of wrapping is to namespace and control the visibility of member functions. It wraps code inside a function scope and decrease clashing with other libraries. This is what we call Immediately Invoked ... Read More

What is the (function() { } )() construct in JavaScript?

Rishi Rathor

Rishi Rathor

Updated on 16-Jun-2020 09:15:21

2K+ Views

The (function() { } )() construct is an immediately invoked function expression (IIFE). It is a function, which executes on creation.SyntaxHere’s the syntax −(function() {    // code })();As you can see above, the following pair of parentheses converts the code inside the parentheses into an expression −function(){...}In addition, the ... Read More

Display text inside an element in a smaller font size with Bootstrap

Rishi Rathor

Rishi Rathor

Updated on 12-Jun-2020 22:19:48

222 Views

Use the .initialism class in Bootstrap to show text inside an element. This allows setting smaller font size in Bootstrap −ExampleLive Demo           Bootstrap Example                                 ... Read More

Add a fading effect when closing an alert box in Bootstrap

Rishi Rathor

Rishi Rathor

Updated on 12-Jun-2020 21:41:44

307 Views

Use the .fade class in Bootstrap to add a fading effect when the alert is closed:ExampleLive Demo           Bootstrap Example                                          Eclipse Refactoring                       ×             To refactor code in Eclipse, try the below given steps in the video (You can also close this alert)                                                                

Make a group of buttons span the entire width of the screen with Bootstrap

Rishi Rathor

Rishi Rathor

Updated on 12-Jun-2020 20:27:18

838 Views

To make a group of buttons span entire width of the screen, use the .btn-group-justified.You can try to run the following code to implement the .btn-group-justified class −ExampleLive Demo           Bootstrap Example                       ... Read More

Bootstrap Glyphicons

Rishi Rathor

Rishi Rathor

Updated on 12-Jun-2020 19:34:49

219 Views

Glyphicons are icon fonts that you can use in your web projects.Under the Bootstrap directory structure, go to the fonts folder to get the following glyphicons −glyphicons-halflings-regular.eotglyphicons-halflings-regular.svgglyphicons-halflings-regular.ttfglyphicons-halflings-regular.woffTo use the icons, try the following code snippet:

Usage of Bootstrap Modal Plugins

Rishi Rathor

Rishi Rathor

Updated on 12-Jun-2020 18:50:44

234 Views

A modal is a child window that is layered over its parent window. Typically, the purpose is to display content from a separate source that can interact without leaving the parent window. Child windows can provide information, interaction, or more.Toggle the modal plugin's hidden content −Via data attributes − Set ... Read More

Bootstrap thumbnail class

Rishi Rathor

Rishi Rathor

Updated on 12-Jun-2020 18:19:54

198 Views

The role of .thumbnail class in Bootstrap is used to create a thumbnail for images −ExampleLive Demo           Bootstrap Example                                                                                                    

Create a navbar scrolling with the page in Bootstrap

Rishi Rathor

Rishi Rathor

Updated on 12-Jun-2020 17:25:53

2K+ Views

To create a navbar that scrolls with the page, add the .navbar-static-top class. This class does not require adding the padding to the .ExampleLive Demo           Bootstrap Example                                                       Car Accessories                                                Car Cover                Car Mobile Holder                Car Mobile Charger                                

Usage of btn-sm Bootstrap class

Rishi Rathor

Rishi Rathor

Updated on 12-Jun-2020 16:11:24

146 Views

Create a small button using the btn-sm Bootstrap class. You can try to run the following code to implement the btn-sm Bootstrap class:ExampleLive Demo           Bootstrap Example                                                       Subject                                             Programming             Web Dev             Database             Networking                    

Previous 1 ... 4 5 6 7 8 ... 15 Next
Advertisements