O'Reilly logo

HTML5 Data and Services Cookbook by Mite Mitreski, Gorgi Kosev

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating a multiple-selection list

Chosen can be used to create beautiful-looking multiple selections. In this recipe, we will create a form for a menu ordering that uses this type of selections in a form.

Creating a multiple-selection list

Getting ready

This recipe will contain the same parts as Creating a custom single-selection list, and build upon them.

How to do it...

We start by having the same base as Creating a custom single-selection list, and add the following parts:

  1. First, we add the selections that will have the drop-down CSS class we created in the head section:
     <div> <label for="cocktails">Place the order for cocktails</label> <select id="cocktails" data-placeholder="Add ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required