First off, shame on you for putting javascript in an HTML attribute. Somebody has to make a value judgement at some point, and for me, it's javascript event handlers on HTML tags. Sorry, had to be said.
Software Developer, Amateur Philosopher, Young Punk
First off, shame on you for putting javascript in an HTML attribute. Somebody has to make a value judgement at some point, and for me, it's javascript event handlers on HTML tags. Sorry, had to be said.
My rule of thumb is to use the quick and dirty way when I'm making a "one off" object that is just temporary and won't have many instantiations.
I love code. I like to write code, I like to read code. I dream about code, sometimes good dreams, sometimes bad repetitive ones where I’m stuck in a for loop and can’t get out (anybody else ever have that dream?).
Although not the best metric, sometimes a project is measured by lines of code. As of right now, the GDCT Next Gen site has over 10,000 lines of javascript code alone; not counting the server side code that handles the database interactions, authentication, logging, profiling and business rules.
... blood, sweat, tears and quite a bit of dubstep music have gone into every line.
Modern web development still sucks. But I've learned to manage some of the sucky parts with what your going to see here today.
HTML5 is a collection of state of the art browser API's and semantic markup elements built to let you make the next generation of applications that make use of native resources without the native application walled garden.
If I want to build a deck I'm going to use a damn circular saw because it's fast and I'm trying to build a deck, not learn all about the art of building decks or the inner workings of wood cutting devices. Just to drive this metaphor home; jQuery is a damn fine circular saw.
Ethos (noun): The characteristic spirit of a culture, era or community as seen in its beliefs and aspirations.
Current Web Development Values
Bonus Points: We get some bonus points here at the bottom for detecting CSS Transitions and using those instead. The style for the CSS3 Transitions can be found in the jQuery Mobile source on GitHub.
Recently I had a great opportunity to work on a small part of a Lync Powered Expert Question Answer Service. My portion of the code was a simple one page HTML popup that allowed a person to chat with an expert.
One of the cool things I found out about during the project was the HTML5 Dialog Element
The dialog element represents a conversation, meeting minutes, a chat transcript, a dialog in a screenplay, an instant message log, or some other construct in which different players take turns in discourse.
Nifty, eh? I use jquery to insert the root dialog element, then whenever a message is sent or received I inject the dt and dd elements. Here is an example of what the conversation looks like in HTML
By default, the browser will display this like this:
Now that's kinda lame, I want it to look like a real chat screen (with some slick Metro UI Styling), so I added some CSS (take a look at the JSSFiddle CSS Tab for my styles) to hide the dt element and give it a nice blue bubble look. I even added some nice CSS triangles into the mix for some minor speaker perspective.
I've put up a fully coded example with a boring chat bot over at jsFiddle for you to enjoy and mess around with.
Now Playing - La Roux - In For The Kill (Skream Remix) [WTC Mashup]
Jacob