A static website as the name suggest is a site where the content remains the same unless until it is manually updated by the developer or website administrator. Static websites offer significant advantages in terms of performance, security, simplicity, and cost-effectiveness. They are particularly well-suited for projects with fixed content, high traffic expectations, and a need for fast load times and reliability.
JavaScript
JavaScript is primarily known to be a client side scripting language. What if we could use JavaScript on the server itself. That way as a programmer you will be able to use your JavaScript skills not only on client side but also on the server side.
Why NodeJs REPL prints undefined?
We know that REPL stand for READ, EVALUATE, PRINT and LOOP. So when we use a NodeJS REPL, every line of code that we write is immediately processed or evaluated.
JavaScript allows us to declare variable using var, let and const. The last one const is simple and straight forward. Let start with that.
Senario: Accoridan effect basically is an idea where we have multiple paragraphs and their heading. Idea is to show a paragraph when the respective heading is clicked and all other paragraphs should be collapsed.
n one of the previous posts I had discusses about this interesting Drupal module - Asset Injector which allows us to easily add CSS and JavaScript to our Drupal setup.
This post discusses about how you can add jQuery code to the same.
JavaScript is one the most commonly used scripting languages which primarily runs on you Web Browser. The primary use of JavaScript is to manipulate a HTML Page (along with CSS) based on users requirements (of course some has to program that!!).
While working with Drupal (10), you would want to inject/add some of your own CSS/JavaScript without modifying the actual theme CSS.
Senario: To be able to access a particular cell <td></td> on one of the rows in HTML table. Using jQuery we can easily access a particular row and then target a cell of a HTML table easily by using the eq() traversal filter method and the :nt-child() pseudo-class methods available.