Tag: html5

Swapping out images repeatedly at a high frame rate on iOS + Javascript?

Hey all what I am trying to implement is somethting where a user can slide a slider and update an image as the slider moves around. Sometimes the framerate will be ~30 fps. What I have tried: Use an img tag and set the src directly to the respective image. Use a single div and […]

In HTML5, how do I return the results of an SQLite call directly, rather than handing them to a function?

Using SQLite in HTML5, how do I execute a call such as the following so that it’s returned immediately, instead of passing off the result to another function? try { mydb.transaction( function(transaction) { transaction.executeSql( ‘SELECT name FROM celebs order by name limit 100 ‘, [], function(transaction, results) { // would like to return the “results” […]

Move cursor to next contentEditable – JQuery

what I am looking to do specifically is when i press enter it creates a new paragraph the cursor then moves to or selects the new content editable paragraph to begin typing but i cant seem to find a way to do it. /*HTML Layout*/ <div id=”wrap” contenteditable=”true”> || <—-cursor posiiton //*New paragraph content editable […]

Modern javascript design approaches to manage complexity?

I have a web app with a javascript code base that’s growing enough in size to where I’ve had to start re-evaluating how to best design this to manage the complexity. This has led me to a few questions on JavaScript design patterns: Are HTML5 data- or otherwise custom attributes a good idea? Might they […]

Good beginners tutorial to socket.io?

I am very new to the world of webdevelopment and jumped into the bandwagon because I find the concept of HTML5 very interesting. I am fairly confident on working with canvas and would now like to move over to websockets part of it. I have come to understand socket.io is by far the framework to […]

is there any way to stream binary content with javascript

I am hoping to make an example using the developer build of chrome and being able to use subsonic to stream a binary audio file. So far I have not had any luck though. Granted my next option will be try to load in the audio files into windowStorage and toss some magic dust on […]

Retrieve all data-* attributes from an element

Possible Duplicate: Get list of data-* attributes using javascript / jQuery How would you go about retrieving all the data attributes from an element, and throw them into an array? For example, if I have a list element: <li id=”the_example” class=”haz_data” data-foo=”omega” data-bar=”zeta” data-derp=”psi”>Hello, world!</li> I’d love to be able to grab all those data […]

html5 game with canvas, performance problems on firefox (4)

currently i work on a little js/canvas game called “tunnel 2” (i’m pretty sure there’s a well known year old version of this, but i know of none). you can try the game here. also, i’d recommend chrome. so, i developed in google chrome, and it works fine, even on my crappy old machine. i […]

Problem While Doing html5 webapp cache

I have a webapp which has the domain http://draft.mo2do.com when i am accessing the url it will resolve like the below url and redirect to the corresponding site home page http://draft.mo2do.com/s/_91665/Home Here i implemented offline cache. My cache.manifest file is the below CACHE MANIFEST # Offline cache v4.0 # All other resources (e.g. sites) require […]

can window.onPopState() event handler know direction of navigation? (forward,backward)

i have a site that uses ajax navigation with the pushState() method and an onpopstate() handler. when first visiting the main page, i display a default content (without ajax). when someone navigates away from the default page and then goes “back,” a null state is supplied when they should be returning to the default page. […]