Aaron Presley

← Writing
Awesome Dropdown: A jQuery Plugin

June 29, 2013

In an effort to start making some of my code public, I decided to open up one of my more recent jQuery plugins. I'm not very good at naming things, so I'm calling it Awesome Dropdown. You can view the BitBucket repo here.

Here's what it looks like:

The HTML

This is a sentence that might
<a class="awesomedd" href="#some-div">launch</a> the dropdown
<div style="display:none">
  <div id="some-div">Content Here</div>
</div>

The Javascript

$("a.awesomedd").AwesomeDD({
  title: Dropdown Heading, // The heading of this dropdown (optional)
  pre_show: function () {}, // Actions to take before showing the dropdown
  post_show: function (elem) {}, // Actions to take after dropdown is shown
})