Time for action – opening a link in a new window

  1. We'll get started with our basic HTML file and associated files and folders that we created in Chapter 1, Designer, Meet jQuery. Inside the <body> of the HTML document, we'll add some links as follows:
    <h1>Opening Links in a New Window</h1>
    <p>This link will open in a new window: <a href="http://packtpub.com">New Window!</a></p>
    <p>This link will not: <a href="http://packtpub.com">Same Window!</a></p>

    This is just a heading and two simple paragraphs, each with a link—one that should open in a new window and one that won't.

  2. We need some way to select the link that should open in a new window. This is similar to the situation we would have if we wanted to style one of the links differently from the other ...

Get jQuery for Designers Beginner's Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.