From the course: Creating HTML Layouts with InDesign

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Using custom JavaScript to modify functionality

Using custom JavaScript to modify functionality - InDesign Tutorial

From the course: Creating HTML Layouts with InDesign

Start my 1-month free trial

Using custom JavaScript to modify functionality

- In this video I'll show you how to attach custom JavaScript to modify the behavior of your exported HTML. If you wanna follow alone in the Exercise Files I'm in Chapter 9, 09_02. In the start folder I'm gonna open up the alice_scroll.idml file. Before I make any changes I'll go up to File and Save it As alice_scroll, into the end folder. This is the same reflowable file we were working in the last video. We have the scroll indicator at the bottom and we already have custom CSS attached. Now we're gonna add some JavaScript so that when we scroll down to the bottom that indicator will disappear. So I'm not gonna actually make you write the JavaScript, but let's take a look at the JavaScript file just to see what it's doing. Gonna open this scroll.js file in TextWrangler, and I'll walk you through line by line. Just a note, I've written this code for simplicity. It's not bulletproof, so it may not work in older versions of IE, for example. Just wrote this as a simple example. The first…

Contents