Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
-
Economics & Finance
HTML Articles
Page 134 of 151
Align the components with Bootstrap
Bootstrap provides utility classes to align navbar components horizontally. Use .navbar-left to float elements to the left and .navbar-right to float elements to the right within the navbar. Alignment Classes Bootstrap offers two primary classes for navbar alignment: .navbar-left - Floats elements to the left side of the navbar .navbar-right - Floats elements to the right side of the navbar These classes can be applied to navigation lists, forms, buttons, and text elements within the navbar. Example Here's a complete example demonstrating left and right alignment of various navbar components: ...
Read MoreGet Bootstrap Jumbotron of full width and without rounded corners
To get a jumbotron of full width and without rounded corners, use the .jumbotron class outside all .container classes and instead add a .container within. This approach makes the jumbotron span the entire viewport width while keeping the content properly centered. Default vs Full-Width Jumbotron When you place .jumbotron inside a container, it has rounded corners and limited width. Placing it outside removes these constraints: Placement Width Rounded Corners Use Case Inside .container Limited Yes Card-like appearance Outside .container Full viewport No Hero sections, landing pages Example ...
Read MoreBootstrap Collapsible list group
To create a collapsible list group in Bootstrap, combine the panel-collapse property with the list-group property. This creates an expandable section containing a list of items that can be toggled with a click. Basic Structure A collapsible list group consists of three main components: Panel container: Wraps the entire collapsible section Panel header: Contains the clickable trigger element Collapsible content: Houses the list group items Example The following example demonstrates a collapsible list group with programming languages. Click the "Info" header to expand or collapse the list: ...
Read MoreAdding an element in an array using Javascript
Adding an element to an array can be done using different functions for different positions. Adding an element at the end of the array This can be accomplished using the push method. For example, let veggies = ["Onion", "Raddish"]; veggies.push("Cabbage"); console.log(veggies); This will give the output − ["Onion", "Raddish", "Cabbage"] You can also use this to push multiple items at the same time as it supports a variable number of arguments. For example, let veggies = ["Onion", "Raddish"]; veggies.push("Cabbage", "Carrot", "Broccoli"); console.log(veggies); This will give the ...
Read MoreJSON. stringify( ) function in JavaScript
The JSON.stringify() method converts a JavaScript object or value to a JSON string. This is the reverse of JSON.parse() which converts JSON strings back to JavaScript objects. Syntax JSON.stringify(value, replacer, space) Parameters value: The JavaScript value to convert to JSON string (required) replacer: Function or array to transform values (optional) space: Number of spaces or string for indentation (optional) Basic Example JSON.stringify Example var obj = {Tutorial: "JavaScript", Version: "ES6", ...
Read MoreparseFloat() function in JavaScript
The parseFloat() function parses a string and returns a floating-point number. It reads the string from left to right until it encounters a character that cannot be part of a number. Syntax parseFloat(string) Parameters The function takes only one parameter: string - The string to be parsed into a floating-point number Return Value Returns a floating-point number parsed from the string. If the first character cannot be converted to a number, it returns NaN. Example: Basic Usage JavaScript parseFloat Example ...
Read MoreisFinite() function in JavaScript
The isFinite() function accepts a value and determines whether the given value is a finite number or not. If so, this method returns true, else it returns false. You can also invoke this method using the Number object as Number.isFinite(). Syntax isFinite(value) Number.isFinite(value) Parameters value: The value to be tested for finiteness. Return Value Returns true if the value is a finite number, false otherwise. Example: Basic Usage JavaScript Example ...
Read MoreencodeURIComponent() function in JavaScript
The encodeURIComponent() function accepts a string representing a URI component and encodes it by replacing special characters with percent-encoded sequences. This is essential for safely passing data in URLs. Syntax encodeURIComponent(uriComponent) Parameters uriComponent: A string to be encoded as a URI component. Return Value Returns a new string representing the encoded URI component with special characters replaced by percent-encoded sequences. Example 1: Basic Usage JavaScript Example var url = 'http://www.tutorialspoint.com/'; ...
Read MoredecodeURIComponent() function in JavaScript
The decodeURIComponent() function accepts a string value representing an encoded URI (Uniform Resource Identifier), decodes it, and returns the result. It reverses the encoding done by encodeURIComponent(). Syntax decodeURIComponent(encodedURI) Parameters encodedURI: A string representing an encoded URI component that you want to decode. Return Value Returns a new string representing the decoded version of the given encoded URI component. Example JavaScript Example var encodedData = encodeURIComponent('http://www.qries.com/?x=шеллы'); ...
Read MoreTypedArray.BYTES_PER_ELEMENT property in JavaScript
The BYTES_PER_ELEMENT property of TypedArrays represents the number of bytes each element occupies in memory. This static property helps determine the memory size of different typed array types. Syntax TypedArray.BYTES_PER_ELEMENT Where TypedArray can be any typed array constructor like Int8Array, Float32Array, etc. Example: Different TypedArray Sizes JavaScript Example var sizeOfFloat32Array = Float32Array.BYTES_PER_ELEMENT; document.write("Size of Float32Array element: " + sizeOfFloat32Array + " bytes"); ...
Read More