This works. However, clicking the "#pages-btn" again doesn't close "#instruct-pages" div. Is there a better way to write this? Thanks for the help.
Here is a fiddle to demonstrate my issue: http://jsfiddle.net/PCzfs/1/
$("#pages-btn").click(function () {
$("#instruct-pages").fadeToggle();
$(this).addClass("options-active");
});
$(document).mouseup(function (e) {
var container = $("#instruct-pages");
if (!container.is(e.target)
&& container.has(e.target).length === 0)
{
container.fadeOut();
$("#pages-btn").removeClass("options-active");
}
});