Categories
JavaScript Selecting

JavaScript for optimizers #26: How to select an element type?

Example

Select an element type:

let getParagraph = document.querySelector("p"); 
console.log(getParagraph);

Try it out for yourself by going to the testing page and running the code in the browser console.

Categories
JavaScript Selecting

JavaScript for optimizers #25: How to select an element with multiple classes?

Example

Select an element with multiple classes:

let testImage = document.querySelector(".classOne.classTwo");
console.log(testImage);

Try it out for yourself by going to the testing page and running the code in the browser console.

Categories
JavaScript Selecting

JavaScript for optimizers #24: How to select elements with ids?

Example

Select an element with an id:

let testImage = document.querySelector("#imageElement");
console.log(testImage);

Try it out for yourself by going to the testing page and running the code in the browser console.

Categories
JavaScript Selecting

JavaScript for optimizers #23: How to select an element with a class?

Example

Select an element with a class:

let testImage = document.querySelector(".wp-image-1596");
console.log(testImage);

Try it out for yourself by going to the testing page and running the code in the browser console.

Categories
Action JavaScript Styling

JavaScript for optimizers #22: How to change CSS with JavaScript?

Sometimes you need to make visual changes to elements when creating your a/b tests with JavaScript. You don’t always have a developer that can set up a style sheet for you. So the question might arise: How to change CSS with JavaScript? This is what I will teach you in this article.

Categories
JavaScript Working with code

How long does it take to learn JavaScript?

Some can learn JavaScript in a couple of months while others need years to grasp the subject. How long does it take you to learn JavaScript? This really depends. Let’s try to break it down.

Categories
Action Changing JavaScript

JavaScript for optimizers #21: Testing the right mobile keyboard with credit card fields

In this article, we will be testing the right mobile keyboard for credit cards according to Baymard. It involves getting the right input mode, setting a pattern, disabling validation, disabling auto-correction, and setting the right autocomplete.

Categories
Action Changing JavaScript

JavaScript for optimizers #20: Testing optimized phone fields

In this article, we will be testing optimized phone fields according to Baymard. It involves disabling auto-correction, getting the right keypad with numbers, and setting the right autocomplete.

Categories
Action Changing JavaScript

JavaScript for optimizers #19: Testing optimized e-mail fields

In this article, we will be testing out optimized e-mail fields according to Baymard. It involves disabling auto-correction, getting the right keypad, and auto-capitalization.

Categories
Action Adding JavaScript

JavaScript for optimizers #17: Adding a back-to-top button

In this article, we will be adding a back-to-top button.

We’re going to apply the changes below:

We are adding a back-to-top button
We are adding a back-to-top button