Tag: html5

html5, what is isContentEditable?

chrome supports the isContentEditable property (lists it in the “Inspect Element”), but reports false for INPUT, FORM – actually, everything. too me, for example, seems that INPUT, non-readonly, should be true. does anybody know what’s going on?

Reading large images as thumbnails locally via HTML5 filereader

I am trying to load local images as thumbnails as explained here. My code is below. This works fine for small images. However, when you try load larger images (e.g. 4mb) there is a huge lag. Is there any way to optimize this? Thanks Html <input type=”file” id=”files” name=”files[]” multiple /> <output id=”list”></output> Javascript <script> […]

Custom data-attribute selector not working

Any idea why this happens … var attr = $(this).data(‘link’); console.log(attr); // profile_following console.log($(“a[data-target=’profile_following’]”)); // found the object console.log($(“a[data-target=’+attr+’]”)); // [] empty Inside of a click handler I have the lines above! console.log(attr); successfully prints profile_following However if I try to select a link with an attribute selector and this variable like this console.log($(“a[data-target=’+attr+’]”)); it […]

Quick Print HTML5 Canvas

I want to send/print the canvas image directly to the default printer. That means a quick printing. Anyone can give a hint. Javascript or jQuery.

What is the alternative to `alert` in metro apps?

I created my first app on Windows 8 vs 2012 and it runs and works fine. But when I try to say “helloworld” from JavaScript like this: alert(“Hello World”); I get an error: Unhandled exception at line 21, column 13 in ms-appx://1af489cf-bac6-419b-8542-fdc18bdd2747/default.html 0x800a1391 – JavaScript runtime error: ‘alert’ is undefined What is the alternative if […]

Child elements are allowing drag/drop

I’m having a weird issue with dragging and dropping in html5. Panel A has a list of the type of elements you can drag. Panel B is where the elements are dragged. Panel C and D are other places you can drag elements, and you can drag and rearrange elements between Panels B, C and […]

How to bend/curve a image in html5 canvas

i have this i want to do this to HTML <canvas id=”mycanvas”></canvas> JS var temp_can1, temp_can1_ctx; $(document).ready(function () { temp_can1 = document.getElementById(‘mycanvas’); temp_can1_ctx = temp_can1.getContext(‘2d’); var imageObj_rotator3 = new Image(); imageObj_rotator3.onload = function () { temp_can1_ctx.drawImage(imageObj_rotator3, 0, 0); temp_can1_ctx.globalCompositeOperation = “source-atop”; var pattern = temp_can1_ctx.createPattern(imageObj_rotator3, ‘no-repeat’); temp_can1_ctx.rect(0, 0, temp_can1.width, temp_can1.height); temp_can1_ctx.fillStyle = pattern; temp_can1_ctx.fill(); temp_can1_ctx.globalAlpha […]

How to load image on canvas and put markers on click

Hello there I am working on a final year project app and I don’t have much experience with HTML5. I am attempting to create a simple canvas which loads up an image on start and when the image is loaded, I want to be able to put markers on the image, like how google maps […]

How to refresh a grid and chart

Refresh the grid and chart when clicking the refresh button in kendo ui

how to fill certain percentage area of circle in color in html canvas?

I have some 9 circles in my html page.Each circle has to be filled with certain color with certain percentage.I have drawn the circles using html5 canvas element.But i was only able to fill the enitre circle with a color and not certain percantage area.How can i achieve that?