I'm growing more and more fond of the HTML presentation framework Reveal.js. One thing I was curious about was whether I could use mouse clicks to navigate a presentation. Why? I'm considering using a Bluetooth device to navigate a presentation while I'm away from my laptop. I've also recently installed Touch Mouse from Logitech, which allows your iOS device to drive a mouse (both the cursor and mouse buttons).
I whipped up the following code, which I added to the bottom of the default Reveal.js demo presentation.
The first line sets up the event handler for mouse clicks. The second event handler disables the context menu. This is necessary for right menu clicks. Without it you get the normal right click context menu.
Finally, the actual event handler is somewhat trivial. You check which button was clicked and then use the Reveal API to go either forward or backward. (The Logitech app supports a center mouse button too. You could bind that to the overview feature, which shows you all the slides.)
That's it. Regular links still work fine, which is kind of cool. I'm not sure if I'll actually use this, but I thought it was a fun experiment. If you want to test this, hit up the demo below.

Tomorrow I board a plane for Munich, Germany and my speaking engagement at CFCAMP. While I'm terribly excited about presenting, I'm slightly more excited about the food. Oh, and apparently they make good beer in Germany too.
So - I need advice. Given that I love trying new food and beer, even ones that I don't end up necessarily liking, what should I look for in general? Remember - I eat boudin, haggis and sushi, so I'm pretty much open to anything.
I have a confession to make. I don't mind doing interviews, but I absolutely refuse to watch myself on video. I suppose it's like hearing yourself recorded. That being said, if you want to hear me wax poetic about the web for a few minutes and show off my Star Wars tats, you can watch the incredibly engrossing video below. Thanks to DZone for the interview.
Simon MacDonald is one of the core PhoneGap contributors. He's also a great all around guy and has been one of my "go-to" people when I need help. Today he posted a great blog entry that I've decided to completely steal. (I checked - he was cool with that.) You can read his original post here:
How to Ask Me a Question
I've made a few minor adjustments to his post below with notes where applicable.
How to Ask Me a Question
Hey all,
I love helping people out with their PhoneGap/Cordova (Ray: Add ColdFusion, jQuery, AJAX, HTML5, etc to that ;) issues but I do have a day job (Ray: Actually, this is part of my day job so it is less of an issue for me! :) and sometimes even a home life. It would really help me out if you would provide me with enough information in order to answer your question. In fact I hate to be an ass about this but I'm letting you all know that I'm not going to answer any questions that are along the lines of "it doesn't work". That just isn't helpful. I can't read your mind I don't know how you are using the code.
Here is my advice to you on how to speed up getting a good answer to your query:
SEARCH THE PHONEGAP MAILING LIST ARCHIVES
Your question may have already been answered. Make sure you search at least PhoneGap Google group archives before you ask your question. Go to the PhoneGap Google group and use the search field in the top right of the page. (Ray: Obviously, this applies in general to other technologies as well. Maybe a blog post is in order for finding ColdFusion, jQuery, etc resources?)
PROVIDE DETAILS
Give as many details as possible. Incomplete questions won't likely be answered.
Include the following at a minimum:
- what version number of PhoneGap are you using?
- which platform and version you are testing on? iOS 4.0, Android 2,2, BlackBerry 6.0, etc.
- a detailed description of your problem.
- is this happening in the emulator only, phone only or both?
(Ray: I think most folks can understand how the tips above would be modified for ColdFusion or other technologies.)
Select a concise, informative subject for the post. For example, include:
- Platform, if issue is specific to Android, iOS, etc
- Keyword examples: version, jar file, phonegap plugin, deviceready event, build
- Short phrase summarizing the problem
You may also want to include:
- some sample code that illustrates the problem.
- logs taken while the problem was reproduced.
If the code or logs are huge, let's say over 20 lines please think about using a web service like Gist or Pastebin.com. Alternatively if you have a Dropbox account put the file in your public folder. Then share the link in the question rather than posting a ton of text.
AN EXAMPLE OF QUESTION
Wrong:
PhoneGap does not work for me!
Right:
I get a security error on PhoneGap 0.9.4 when I try to open a database using the Android 3.0 emulator. You can see the code I used here: https://gist.github.com/937307 and the logs I collected here: https://gist.github.com/937315. I have looked at the archives and the commits but did not find any solution. Does anyone know what could be the issue and whether this has been fixed?
Also, for detailed back and forth the blogger comments are not the best place so I encourage you to ask me questions over at my Formspring accountcontact form.
Thanks...
Simon (Ray: Thank you Simon, and thank you readers!)
Thanks to everyone who attended my HDC12 presentation (and who sat through my quickly set up presentation today when a speaker didn't show up). As always, any feedback (including criticisms) would be greatly appreciated.
Both presentations can be downloaded at GitHub. I have a very minor update to the first one below that is not yet pushed up, but if I never complete the push to GitHub on this conference Wi-Fi, you won't be missing anything critical.
First - the debugging web apps assets: https://github.com/cfjedimaster/Web-Debugging-Presentation
Next - the HTML5 Storage assets: https://github.com/cfjedimaster/html5-storage
SOT (or Seriously Off Topic) post to share with you today. This morning I was sitting in the HDC keynote and was surprised to hear the speaker talk about MUDs. For those of you who are a too young, MUDs were multiplayer RPGs in the days before World of Warcraft. They were entirely text based (well, at first) and were basically Zork-clones on acid. Many MUDs existed but they've waned somewhat in popularity over the past few decades.
Yesterday my interview with Job Shadow went live:
Interview with a Developer Evangelist
While I bet most of my readers already know what my job is like, you should check out the site anyway. Basically they interview people about their jobs and get really in depth about what the day to day work is like as well as things like time off and pay. I found the site extremely interesting. Probably the coolest one was the tower climber. Anyway, check out my interview and stick around to read others as well!
This may come as a shocker, but I'm really particular about my editor settings. I'm sure no one else is, but I get pretty darn picky about my editor and how it behaves. One issue I've had with Brackets is a feature called "Smart Indent."
This is pretty exciting news I think. Today we announced the Create the Web tour. This is a sneak peek at what Adobe is doing to help advance the web with new tools and technologies. You've seen some of this already with our work on CSS standards and Brackets, but there is a lot more to come. Currently announced locations for the tour are San Francisco, London, Tokyo, and Sydney.
Details at the site: http://html.adobe.com/events/
Back almost two years ago I posted some sample ColdFusion code that retrieved the followers for a Twitter user and then listed them by the number of followers they had. In other words, it told you who your most important followers were. (Well, "important" being measured by the number of followers a person has. One could argue that isn't the most important metric!)