Leanpub Header

Skip to main content

A better way to learn JavaScript - Building Mini Apps

Let's build some mini apps in JavaScript

Save yourself from thousands of hours of trial and error experiences! Stop feeling overwhelmed! Let this book series take you from a newbie to a confident JavaScript developer in a matter of weeks! I'm aiming for this book series to be the best resource on learning JavaScript.

The author is letting you choose the price you pay for this book!

Pick Your Price...
PDF
EPUB
WEB
About

About

About the Book

This book is the fourth in my 5-book series on JavaScript.

In Book 1, we learned about JS basics, with an in-depth coverage of foundations.

In Book 2, we examined all the built-in objects in depth, including their properties, methods, and constructors.

In Book 3, we went through a bunch of code snippets, simple "sub-programs" that dealt with a specific issue, such as emulating a pair of dice, or capitalizing each first letter in a sentence.

In this book, Building Mini Apps, we're continuing from simple snippets from Book 3, and we're using all the things we've learned so far to build some specific "mini apps": standalone solutions to various issues.

Share this book

Categories

Price

Pick Your Price...

Minimum price

$19.00

$29.00

You pay

$29.00

Author earns

$23.20
$

All prices are in US $. You can pay in US $ or in your local currency when you check out.

EU customers: prices exclude VAT, which is added during checkout.

...Or Buy With Credits!

Number of credits (Minimum 2)

2
The author will earn $24.00 from your purchase!
You can get credits monthly with a Reader Membership

Author

About the Author

Ajdin Imsirovic

Ajdin Imsirovic is a full-stack web developer who has published several courses (way back in 2015) on the subject of web design and web development. 

Before self-publishing books on Leanpub, he authored four books on front-end development for Packt Publishing:

  1. Vue CLI 3 Quick Start Guide (Build and maintain Vue.js applications quickly with the standard CLI), May 2019
  2. Vue.js Quick Start Guide (Learn how to build amazing and complex reactive web applications easily using Vue.js), October 2018
  3. Elm Web Development (An introductory guide to building functional web apps using Elm), March 2018
  4. Bootstrap 4 Cookbook (Over 75 recipes to help you build elegant and responsive web applications with Bootstrap 4), June 2017

Additionally, he's published a number of books on the Leanpub platform, specifically:

  1. A Better Way to Learn JavaScript - The Basics: https://bit.ly/abwtljs1
  2. A Better Way to Learn JavaScript - Built-in Objects: https://bit.ly/abwtljs2
  3. A Better Way to Learn JavaScript - Useful Snippets: https://bit.ly/abwtljs3
  4. A Better Way to Learn JavaScript - Mini Apps: https://bit.ly/abwtljs4
  5. A Better Way to Learn JavaScript - Advanced JavaScript: https://bit.ly/abwtljs5
  6. Angular From Scratch: https://bit.ly/ai-afs
  7. Vue.js From Scratch: https://bit.ly/ai-vfs
  8. React from Scratch: https://leanpub.com/react-from-scratch
  9. Building Amazing Layouts - Learn the Basics of HTML5, CSS3, and Bootstrap 5: https://bit.ly/bldamzlyts1
  10. Building Amazing Layouts - Bootstrap 5 Layouts in Depth: https://bit.ly/bldamzlyts2
Leanpub Podcast

Episode 208

An Interview with Ajdin Imsirovic

Contents

Table of Contents

Chapter 1: Dynamically update a paragraph

  1. Using the onchange attribute
  2. Storing the values from the input into a JS variable
  3. Updating the DOM with the value of the input field
  4. Displaying previous user-generated text using an array
  5. Clearing the input when the user has finished typing
  6. Adding a space character between each of the user inputs
  7. Making our code as dynamic as possible
  8. Setting multiple attributes at once

Chapter 2: Build a multiplication table

  1. How to make a multiplication table with a nested for loop
  2. Bonus: Domain-name generator

Chapter 3: Build a Style Dynamizer

  1. Understanding the basics
  2. Improving the dynamizer using events

Chapter 4: Build a modal in vanilla JS

  1. Adding styles
  2. Preparing the styles for toggling the modal visibility
  3. Attaching an event listener to a button
  4. Adding the show class to our modal’s markup
  5. Removing the show class from our modal’s markup
  6. Conclusion

Chapter 5: Build a full-page navigation menu

  1. Starting with the modal code from the previous chapter
  2. Planning the updates
  3. Update the HTML
  4. Update the CSS
  5. Remove the redundant HTML and CSS code
  6. Updating the JS with updated class names
  7. Conclusion

Chapter 6: Build a slider in vanilla JS

  1. How does our simplest possible slider work?
  2. Improving our slider
  3. Adding the slider buttons (left and right arrows)

Chapter 7: Build a blog post image maker

  1. Scratching our own itch
  2. Preview the app live
  3. Building the app from scratch
  4. Getting the values from the option element using JavaScript

Chapter 8: Simple stopwatch

  1. Building the reset functionality
  2. Adding the stopwatch timer
  3. Adding the Pause functionality
  4. Fixing the time measurement issues
  5. The cop-out solution
  6. Building a stopwatch using the Date object in JS
  7. Incorporating the Date updates in our interval
  8. Add proper formatting to our stopwatch

Chapter 9: Simple timer

  1. The simplest possible timer in JavaScript

Chapter 10: Simplest possible lightbox

  1. Starting to build our lightbox
  2. Adding a single image
  3. Showing a larger version of the photo
  4. Adding the “close modal” functionality
  5. Fixing the broken styling
  6. Adding additional images to our lightbox example
  7. Assessing the problem to solve
  8. Re-thinking our implementation
  9. Putting the entire carousel into a modal
  10. Adding the second image to the preview and the modal
  11. Making our lightbox more realistic
  12. Getting rid of the hard-coded numbers in nextSlide() and prevSlide() methods
  13. Adding the close button functionality

Chapter 11: An accordion in JS

  1. Plan the structure of our simple accordion
  2. Adding styles
  3. Setting up the logic using JavaScript
  4. Conclusion

Chapter 12: A dropdown button in JS

  1. Adding the HTML and CSS
  2. Making the dropdown toggle display with JS
  3. Updating the styles
  4. Registering a click outside of the dropdown div

Chapter 13: A tabbed navigation in JS

  1. Why tabs?
  2. Tabs variations
  3. Examples of tabbed navigation in use
  4. Planning the HTML structure
  5. Planning the CSS styles
  6. Planning the JS logic
  7. Writing our HTML code
  8. Writing our CSS code
  9. The result of our current code
  10. Adding the tab panels
  11. Writing the JS code
  12. Setting up click event listeners on tab menu items
  13. Displaying the active class on the clicked tab menu item
  14. Show the appropriate tab panel on click
  15. Cleaning up the previous active panels
  16. The completed code
  17. Conclusion

Chapter 14: Sliding nav

  1. The most basic sliding nav
  2. Hiding the nav
  3. Improving our simplest sidebar nav
  4. Adding a transition using CSS
  5. Revising the steps to build a sidebar sliding nav
  6. Conclusion

Chapter 15: Tag input

  1. The structure of our tag input
  2. Writing our tag input’s structure and styles
  3. Adding some basic interactivity to our tag input component
  4. Making our tag input react to user-triggered keydown events
  5. Adding the user-generated value from the input as another span tag
  6. Cleaning up our tag input’s code and appending tags in logical order
  7. Deleting previously added tags from the tag input

Chapter 16: Multi-image slider

  1. How does our multi-image slider component work?
  2. Building the multi-image slider prototype
  3. Intermission
  4. Improving our multi-image slider component
  5. Adding constraints to our multi-image slider movement
  6. Completing our multi-image slider component

Chapter 17: Building a Zoom-in Image Preview Component

  1. 1. HTML
  2. 2. CSS
  3. 3. JavaScript
  4. Conclusion
  5. Chapter 18: Building a Custom Select Component

Chapter 19: Double-sliding menu

  1. Chapter 20: Building a Header that Changes on Scroll

The Leanpub 60 Day 100% Happiness Guarantee

Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.

Now, this is technically risky for us, since you'll have the book or course files either way. But we're so confident in our products and services, and in our authors and readers, that we're happy to offer a full money back guarantee for everything we sell.

You can only find out how good something is by trying it, and because of our 100% money back guarantee there's literally no risk to do so!

So, there's no reason not to click the Add to Cart button, is there?

See full terms...

Earn $8 on a $10 Purchase, and $16 on a $20 Purchase

We pay 80% royalties on purchases of $7.99 or more, and 80% royalties minus a 50 cent flat fee on purchases between $0.99 and $7.98. You earn $8 on a $10 sale, and $16 on a $20 sale. So, if we sell 5000 non-refunded copies of your book for $20, you'll earn $80,000.

(Yes, some authors have already earned much more than that on Leanpub.)

In fact, authors have earned over $14 million writing, publishing and selling on Leanpub.

Learn more about writing on Leanpub

Free Updates. DRM Free.

If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).

Most Leanpub books are available in PDF (for computers) and EPUB (for phones, tablets and Kindle). The formats that a book includes are shown at the top right corner of this page.

Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.

Learn more about Leanpub's ebook formats and where to read them

Write and Publish on Leanpub

You can use Leanpub to easily write, publish and sell in-progress and completed ebooks and online courses!

Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks.

Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. (Or, if you are producing your ebook your own way, you can even upload your own PDF and/or EPUB files and then publish with one click!) It really is that easy.

Learn more about writing on Leanpub