Did you know?

Click any word in a definition or example to find the entry for that word

What is the Double-click feature?

The Macmillan Dictionary Double-Click feature can be added to all of the pages on your website. The feature has been integrated on this page — try it yourself! Once implemented, users can double-click or select text on any page to see a definition in Macmillan Dictionary.

A new window will open, displaying the search result / definition in www.macmillandictionary.com

What do I need?

Installing our search box on your site requires the following:

  • ability to edit the HTML source of your web page
  • ability to load files to your server. These are JavaScript files that are required for the double-click feature.

What do I do?

Please follow the steps below to integrate the feature.

Step 1: Apply required JavaScript files
  1. download the following Javascript files
    • jquery.js : this is a famous JavaScript library; check if it is already used in your pages. If not, download the last minified version on http://jquery.com
    • doubleclick.js : code that contains the doubleclick functionalities. Right click this link and 'save target as' to download BY CLICKING HERE TO DOWNLOAD THIS SOFTWARE YOU AGREE TO THE TERMS OF THE FOLLOWING DISCLAIMER:
      THIS SOFTWARE IS SUPPLIED TO YOU BY MACMILLAN WITHOUT ANY WARRANTIES OR GUARANTEES OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING, WITHOUT LIMITATION, THE WARRANTY OF MERCHANTABILITY AND WARRANTY OF FITNESS FOR A PARTICULAR PURPOSE.
      MACMILLAN SHALL NOT BE HELD LIABLE FOR ERRORS CONTAINED HEREIN, OR FOR LOST PROFITS, LOST OPPORTUNITIES, CONSEQUENTIAL OR INCIDENTAL DAMAGES INCURRED AS A RESULT OF THE OPERATION OF THIS SOFTWARE.
  2. Load the files to your server. It is common to place JavaScript files within a folder named "scripts" on the root directory of your site.
  3. Paste the following code in the head element of your web page. The following assumes that the JavaScript files are in a folder named "scripts" in the root directory. If not, please modify the path to the files.
Step 2: Call Javascript function from your HTML

This is achieved using 1 of the following methods:

  1. Replace the opening body tag in your page with this code
  2. Include the following script within the body element in your page
  3. The code can be customised by editing the following parameters:

    websiteUrl: The target website

    dictionary: The version of dictionary that you are targeting. possible values are british or american

    areaId: The ID (#) of the element in which the double click should be performed. Leave null to perform on the whole page.

    maxAllowedWords: Maximum number of selected words to submit. Leave false for no limit

Step 3 (optional): Explain feature to your site users

It is important to make your users aware of the double click feature.

You may wish to use the image below on your site to advertise the feature.

Alternatively, you could include text reading "double click any word for it's definition."

You may wish to link to the following text for a fuller explanation

See all our English dictionary gadgets and plugins