Adapt.js Jump Start PRO

Adapt.js is a simple tiny JavaScript library that allows you to develop web pages that automatically adjust themselves to the web browser screen size. The Adapt.js library dynamically checks the width of the web browser and serves the CSS file for that width.

The following video shows how simple it is to use this library and how Adapt.js dynamically load the relevant CSS file when the web browser width changes.

The code shown in this video clip is available below. Make sure you fix the relative links to the JavaScript and the CSS files.

<!DOCTYPE html>
<html>
<head>
<title>Adapt.js Jump Start</title>
<script>
var ADAPT_CONFIG = {
  path: 'css/',
  dynamic: true,
  range: [
    '0px    to 720px  = mobile.min.css',
    '720px  to 980px  = 720.min.css',
    '980px  to 1280px = 980.min.css',
    '1280px           = 1280.min.css'
  ]
};
</script>
<script src="js/adapt.min.js"></script>
</head>
<body>
    <h1>Adapt.js Jump Start</h1>
</body>
</html>

You can find the complete sample with all the other files it uses as well as slides and video clips for learning how to use the Adapt.js library in my new Adapt.js Basics free course at http://abelski.lifemichael.com.

Share:

The Visitor Design Pattern

The Visitor Design Pattern

The visitor design pattern allows us to add operations to objects that already exist without modifying their classes and without extending them.

What are Anti Patterns?

Anti Patterns

Unlike design patterns, anti patterns just seem to be a solution. However, they are not a solution and they cause additional costs.

Virtual Threads in Java Professional Seminar

Virtual Threads in Java

The use of virtual threads can assist us with improving the performance of our code. Learn how to use virtual threads effectively.

NoSQL Databases Courses, Seminars, Consulting, and Development

MongoDB Design Patterns Meetup

The use of MongoDB involves with various cases in which we can overcome performance issues by implementing specific design patterns.

image of woman and database

Record Classes in Java

Learn how to define record classes in Java, and when to use record classes in your code. Stay up to date with the new Java features.

Accessibility | Career | Conferences | Design Patterns | JavaScript | Meetups | PHP | Podcasts | Python | Self Learning

Teaching Methodologies | Fullstack | C++ | C# | CSS | Node.js | Angular | Java | Go | Android | Kotlin | Swift | Academy

Front End Development | Scala | Architectures | Cloud | Big Data | Internet of Things | Kids Learn Programming

The Beauty of Code

Coding is Art! Developing Code That Works is Simple. Develop Code with Style is a Challenge!

Skip to content Update cookies preferences