jQuery-UI Eating Contest
Using a jQuery-UI modal dialog in your Meteor app is as easy as the proverbial pie (eating it, that is, not making it, which is decidedly more difficult); simply follow these steps:
- In the console, enter "meteor add linto:jquery-ui" to install the package.
- Add a "
hide
" CSS class:
.hide {
visibility: hidden;
display: none;
}
- Add some HTML to the Template where the Dialog should display, hiding it by default, such as:
<template name="platypus"> <div id="duckbill"
name="duckbill"> <h2>Duckbilled Platypi of the World Unite!</h2>
<img alt="platypus image" height="275" id="imgPlatypusParty"
name="imgPlatypusParty" src="images/dplat.png" width="350" />
</div> <div class="hide" id="dialog" title="Basic dialog">
<p>Put whatever you want in here.</p> </div> </template>
- In response to some event, unhide the
div
and call dialog()
on it, such as:
Template.platypus.events({
'click #imgPostTravelBottom': function() {
$( "#dialog" ).removeClass('hide');
$( "#dialog" ).dialog(); }
});
And that's all there is to it! It's almost as easy as falling off a log, and is as easy as pie, which is "funner."
I am in the process of morphing from a software developer into a portrayer of Mark Twain. My monologue (or one-man play, entitled "The Adventures of Mark Twain: As Told By Himself" and set in 1896) features Twain giving an overview of his life up till then. The performance includes the relating of interesting experiences and humorous anecdotes from Twain's boyhood and youth, his time as a riverboat pilot, his wild and woolly adventures in the Territory of Nevada and California, and experiences as a writer and world traveler, including recollections of meetings with many of the famous and powerful of the 19th century - royalty, business magnates, fellow authors, as well as intimate glimpses into his home life (his parents, siblings, wife, and children).
Peripatetic and picaresque, I have lived in eight states; specifically, besides my native California (where I was born and where I now again reside) in chronological order: New York, Montana, Alaska, Oklahoma, Wisconsin, Idaho, and Missouri.
I am also a writer of both fiction (for which I use a nom de plume, "Blackbird Crow Raven", as a nod to my Native American heritage - I am "½ Cowboy, ½ Indian") and nonfiction, including a two-volume social and cultural history of the U.S. which covers important events from 1620-2006: http://www.lulu.com/spotlight/blackbirdcraven