open modal in jqwuery
$("#myModal").modal()
Here is what the above code is Doing:
1. We’re using the jQuery selector to find the element with the id of myModal.
2. We’re using the jQuery method .modal() to show the modal.
$("#myModal").modal()
Here is what the above code is Doing:
1. We’re using the jQuery selector to find the element with the id of myModal.
2. We’re using the jQuery method .modal() to show the modal.
Everything Here is what the above code is Doing: 1. We’re creating a variable called html_string. 2. We’re assigning a string to that variable. 3. We’re using the triple-quotes to create a multi-line string. 4. We’re using the triple-quotes to create a string that contains quotes. 5. We’re using the triple-quotes to create a string…
var element = document.querySelector(‘#Element’); var elementChildren = element.querySelectorAll(‘.Element-child’); Here is what the above code is Doing: 1. We’re selecting the element with the ID of “Element” and storing it in a variable called “element”. 2. We’re selecting all of the elements with the class of “Element-child” that are children of the element with the ID…
import React from “react”; import { makeStyles } from “@material-ui/core/styles”; const useStyles = makeStyles((theme) => ({ root: { backgroundColor: theme.palette.secondary.main } })); export default function App() { const classes = useStyles(); return ( Hello CodeSandbox Start editing to see some magic happen! ); } Here is what the above code is Doing: 1. We’re importing…
const removeSpaces = str => str.replace(/\s/g, ”); // Example removeSpaces(‘hel lo wor ld’); // ‘helloworld’ Here is what the above code is Doing: 1. The replace() method searches a string for a specified value, or a regular expression, and returns a new string where the specified values are replaced. 2. The g modifier is used…
const str = ‘The quick brown fox jumps over the lazy dog.’; console.log(str.slice(31)); // expected output: “the lazy dog.” console.log(str.slice(4, 19)); // expected output: “quick brown fox” Here is what the above code is Doing: 1. The first console.log() statement is logging the string starting from the 31st character. 2. The second console.log() statement is…
Submit Quiz Here is what the above code is Doing: 1. We’re creating a div with an id of quiz. This is where we’ll dynamically insert our quiz questions. 2. We’re creating a button with an id of submit. This is where we’ll dynamically insert our submit button. 3. We’re creating a div with an…