Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Instant jQuery Boilerplate for Plugins
  • Table Of Contents Toc
Instant jQuery Boilerplate for Plugins

Instant jQuery Boilerplate for Plugins

By : Jonathan Fielding
4 (2)
close
close
Instant jQuery Boilerplate for Plugins

Instant jQuery Boilerplate for Plugins

4 (2)
By: Jonathan Fielding

Overview of this book

jQuery plugins helps you to extend jQuery's prototype object. jQuery plugins are used to achieve a specific task with a collection of elements, they are modular and reusable across several projects.Instant jQuery Boilerplate for Plugins is a hands on guide to writing your own plugins. The recipes in this book will guide you through the steps of plug-in development.Each recipe is a short tutorial within itself that will help you explore different options available within jQuery by providing a clear explanation on what jQuery Boilerplate has to offer. By the end of the book, you will have learned how to write a plugin and will be ready to start writing plugins of your own.
Table of Contents (7 chapters)
close
close

Preface

Instant jQuery Boilerplate for Plugins is a guide to getting started with writing your first jQuery plugin. We will explore the different options available, offer a full breakdown of what jQuery Boilerplate has to offer, and then go through several tutorials to get you comfortable with writing a plugin. Once you have got to grips with writing your plugin, we will finally explore how you can go about making your own plugin and making it available as an open source project.

What this book covers

Getting started with jQuery plugins (Simple) explores the steps we need to take to prepare ourselves for jQuery plugin development using jQuery Boilerplate.

Getting started with your first plugin (Simple) will get us started with writing our first plugin. We will write a simple plugin that swaps the shape that is shown on the page.

Creating a simple JSON reader (Simple) looks at creating a JSON reader that reads your tweets from Twitter and displays them on the page.

jQuery Hover panels with jQuery Boilerplate (Simple) explores creating a plugin that allows users to hover over a panel to reveal alternative content.

Writing a carousel with jQuery Boilerplate (Intermediate) explores how we go about writing a carousel jQuery plugin.

AJAX bookshelves with jQuery Boilerplate (Advanced) explains how to build an AJAX bookshelf that imports a JSON feed and then builds the HTML to create a pull-out bookshelf.

Writing a validation plugin using jQuery Boilerplate (Intermediate) explains how to write a validation plugin; once we have finished our plugin, we will learn how we can test it using QUnit.

Who this book is for

This book is for anyone who wants to write their own plugin or know the basics of plugin writing so that they can contribute to other plugins. You need to have a good understanding of HTML, CSS, JavaScript and preferably have used the jQuery library before.

When writing this book, it is assumed that readers have a good understanding of:

  • HTML

  • CSS

  • JavaScript

  • jQuery

If you wish to do some reading on jQuery before you begin to develop your own plugins, I recommend the following book:

Learning JQuery Third Edition by Jonathan Chaffer and Karl Swedberg, Packt Publishing

Conventions

In this book, you will find a number of styles of text that distinguish between different kinds of information. Here are some examples of these styles and an explanation of their meaning.

Code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles are shown as follows: "Using our base template from earlier, we will start out with creating a new file called data.json in the root of the project."

A block of code is set as follows:

var templates = {
        container   : "<div id='bookshelf'><h1>%BookshelfName%</h1><a class='pull' href='#'>Pull</a><div id='bookshelf_books'></div></div>",
        book: "<div class='book'><h2>%Title%</h2><img 
        src='%Cover%'/><p>%Author%</p><p>%Publisher%</p></div>"
    };

When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:

var templates = {
        container   : "<div id='bookshelf'><h1>%BookshelfName%</h1><a class='pull' href='#'>Pull</a><div id='bookshelf_books'></div></div>",
        book: "<div class='book'><h2>%Title%</h2><img src='%Cover%'/><p>%Author%</p><p>%Publisher%</p></div>"
    };

New terms and important words are shown in bold. Words that you see on the screen, in menus or dialog boxes, for example, appear in the text like this: "Clicking the Next button moves you to the next screen".

Note

Warnings or important notes appear in a box like this.

Tip

Tips and tricks appear like this.

Reader feedback

Feedback from our readers is always welcome. Let us know what you think about this book—what you liked or may have disliked. Reader feedback is important for us to develop titles that you really get the most out of.

To send us general feedback, simply send an e-mail to , and mention the book title via the subject of your message.

If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide on www.packtpub.com/authors.

Customer support

Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.

Downloading the example code

You can download the example code files for all Packt books you have purchased from your account at http://www.packtpub.com. If you purchased this book elsewhere, you can visit http://www.packtpub.com/support and register to have the files e-mailed directly to you.

Errata

Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you find a mistake in one of our books—maybe a mistake in the text or the code—we would be grateful if you would report this to us. By doing so, you can save other readers from frustration and help us improve subsequent versions of this book. If you find any errata, please report them by visiting http://www.packtpub.com/submit-errata, selecting your book, clicking on the errata submission form link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata will be uploaded on our website or added to any list of existing errata, under the Errata section of that title. Any existing errata can be viewed by selecting your title from http://www.packtpub.com/support.

Piracy

Piracy of copyright material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works, in any form, on the Internet, please provide us with the location address or website name immediately so that we can pursue a remedy.

Please contact us at with a link to the suspected pirated material.

We appreciate your help in protecting our authors and our ability to bring you valuable content.

Questions

You can contact us at if you are having a problem with any aspect of the book, and we will do our best to address it.

CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
Instant jQuery Boilerplate for Plugins
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon