Start learning with our library of video tutorials taught by experts. Get started

HTML5 Projects: Advanced To-Do List

Making content editable


From:

HTML5 Projects: Advanced To-Do List

with Joseph Lowery

Video: Making content editable

Do you know how many times I've stared at a web page and thought, boy, I wish I could change that? And did you know that with HTML5 any portion of a web page can be made editable with literally a single word, and that word is contenteditable. We'll apply it to our basic to- do list to get the ball rolling. So I am going to go to my Code Editor and scroll down to around line 38 or so, where I have the div with an ID of container, and an unordered list with the ID of the list, and my initial entry Enjoy Life.

Watch this entire course now—plus get access to every course in the library. Each course includes high-quality videos taught by expert instructors.

Become a member
Please wait...
HTML5 Projects: Advanced To-Do List
45m 50s Intermediate Aug 26, 2013

Viewers: in countries Watching now:

The HTML5 Projects series combines HTML5, CSS3, and recent JavaScript API technologies to enhance your web projects with interactivity and multimedia. This installment shows how to create a basic to-do list widget with an editable field so users can enter their tasks and delete them as they are completed, and a more advanced version with all the bells and whistles, including a drag-and-drop interface that allows for quick and easy sorting. Author Joseph Lowery covers HTML5 technologies such as web databases, content editing in the browser, and CSS transitions and transforms.

Topics include:
  • Making content editable
  • Saving edits
  • Setting up the core files for your app
  • Removing list items
  • Enabling drag-and-drop sorting
Subjects:
Design Web User Experience Web Design Projects
Software:
HTML JavaScript CSS
Author:
Joseph Lowery

Making content editable

Do you know how many times I've stared at a web page and thought, boy, I wish I could change that? And did you know that with HTML5 any portion of a web page can be made editable with literally a single word, and that word is contenteditable. We'll apply it to our basic to- do list to get the ball rolling. So I am going to go to my Code Editor and scroll down to around line 38 or so, where I have the div with an ID of container, and an unordered list with the ID of the list, and my initial entry Enjoy Life.

So all I need to do here in order to make all the items in the unordered list editable is to put in that one attribute and we're going to put it right in the ul tag there, and it is contenteditable. Believe it or not, that's it. Let's save the page and try it out. So I'll go back to the browser, click Refresh, and let's just scroll down a little bit. So now I should be able to just click right in here and let's go ahead and get rid of this placeholder entry here, and I'll put in my own list; quick shopping list of milk, eggs, potatoes, and artichokes.

And now if I want to get rid of something, what I have to do is just go up, highlight it, delete it, and then hit Delete or Backspace in order to move the list up. It's basically an open entry and I can put any straight text I want in here. Well, talk about bang for buck. That just blows me away. But of course there is a hitch. Now if I refresh the page, as if I came back the next day, all my changes are gone. We can amend that situation pretty quickly as you'll see in the next lesson.

There are currently no FAQs about HTML5 Projects: Advanced To-Do List.

Share a link to this course
Please wait... Please wait...
Upgrade to get access to exercise files.

Exercise files video

How to use exercise files.

Learn by watching, listening, and doing, Exercise files are the same files the author uses in the course, so you can download them and follow along Premium memberships include access to all exercise files in the library.
Upgrade now


Exercise files

Exercise files video

How to use exercise files.

For additional information on downloading and using exercise files, watch our instructional video or read the instructions in the FAQ.

This course includes free exercise files, so you can practice while you watch the course. To access all the exercise files in our library, become a Premium Member.

join now

Are you sure you want to mark all the videos in this course as unwatched?

This will not affect your course history, your reports, or your certificates of completion for this course.


Mark all as unwatched Cancel

Congratulations

You have completed HTML5 Projects: Advanced To-Do List.

Return to your organization's learning portal to continue training, or close this page.


OK
Become a member to add this course to a playlist

Join today and get unlimited access to the entire library of video courses—and create as many playlists as you like.

Get started

Already a member?

Become a member to like this course.

Join today and get unlimited access to the entire library of video courses.

Get started

Already a member?

Exercise files

Learn by watching, listening, and doing! Exercise files are the same files the author uses in the course, so you can download them and follow along. Exercise files are available with all Premium memberships. Learn more

Get started

Already a Premium member?

Exercise files video

How to use exercise files.

Ask a question

Thanks for contacting us.
You’ll hear from our Customer Service team within 24 hours.

Please enter the text shown below:

The classic layout automatically defaults to the latest Flash Player.

To choose a different player, hold the cursor over your name at the top right of any lynda.com page and choose Site preferencesfrom the dropdown menu.

Continue to classic layout Stay on new layout
Welcome to the redesigned course page.

We’ve moved some things around, and now you can



Exercise files

Access exercise files from a button right under the course name.

Mark videos as unwatched

Remove icons showing you already watched videos if you want to start over.

Control your viewing experience

Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.

Interactive transcripts

Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.

Thanks for signing up.

We’ll send you a confirmation email shortly.


Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

Keep up with news, tips, and latest courses with emails from lynda.com.

Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

   
submit Lightbox submit clicked