Tag: html5

AngularJS ng-repeat with no html element

I am currently using this piece of code to render a list: <ul ng-cloak> <div ng-repeat=”n in list”> <li><a href=”{{ n[1] }}”>{{ n[0] }}</a></li> <li class=”divider”></i> </div> <li>Additional item</li> </ul> However, the <div> element is causing some very minor rendering defects on some browsers. I would like to know is there a way to do […]

load scripts asynchronously

I am using several plugins, custom widgets and some other libraries from JQuery. as a result I have several .js and .css files. I need to create a loader for my site because it takes some time to load. it will be nice if I can display the loader before importing all the: <script type=”text/javascript” […]

How to get the raw value an <input type=“number”> field?

How can i get the “real” value of an <input type=”number”> field? I have an input box, and i’m using newer HTML5 input type number: <input id=”edQuantity” type=”number”> This is mostly supported in Chrome 29: What i now need is the ability to read the “raw” value the user has entered in the input box. […]

Current State of Javascript Canvas Libraries?

I have been doing research on HTML canvas libraries and I came across this question. What is the current state of the art in HTML canvas JavaScript libraries and frameworks? that was asked in 2010. The top answer was Fabric.js. After doing a bit more research I came across http://www.html5canvastutorials.com/ which features tutorials on KineticJs, […]

Closing WebSocket correctly (HTML5, Javascript)

I am playing around with HTML5 WebSockets. I was wondering, how do I close the connection gracefully? Like, what happens if user refreshes the page, or just closes the browser? There is a weird behavior when a user just refresh the page without calling websocket.close() – when they return after the refresh it will hit […]

Disable Interpolation when Scaling a <canvas>

NOTE: This has to do with how existing canvas elements are rendered when scaled up, not to do with how lines or graphics are rendered onto a canvas surface. In other words, this has everything to do with interpolation of scaled elements, and nothing to do with antialiasing of graphics being drawn on a canvas. […]

How to create a responsive image that also scales up in Bootstrap 3

I am currently using twitter bootstrap 3 and I am facing a problem to create a responsive image. I have used img-responsive class. But the image size is not scaling up. If I use width:100% instead of max-width:100% then it works perfectly. Where is the problem? This is my code: <div class=”col-md-4 col-sm-4 col-xs-12 “> […]

How does inline Javascript (in HTML) work?

I know this is bad practice. Don’t write code like this if at all possible. Of course, we’ll always find ourselves in situations where a clever snippet of inline Javascript can address an issue quickly. I am pursuing this query in the interest of fully understanding what happens (and the potential pitfalls) when something like […]

In HTML5, is the localStorage object isolated per page/domain?

Is the HTML5 localStorage object isolated per page/domain? I am wondering because of how I would name localStorage keys. Do I need a separate prefix? Or can I name them whatever I want?

What is the current state of the art in HTML canvas JavaScript libraries and frameworks?

I am currently investigating options for working with the canvas in a new HTML 5 application, and was wondering what is the current state of the art in HTML canvas JavaScript libraries and frameworks? In particular, are there frameworks that support the kind of things needed for game development – complex animation, managing scene graphs, […]