- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Found 601 Articles for Front End Scripts
![Rishi Rathor](https://www.tutorialspoint.com/assets/profiles/13563/profile/60_89283-1512714754.jpg)
175 Views
For responsive design, you do not have to use user-scalable=no. Use it only if you want your application to look more like a native app.Zooming is a key feature for accessibility and you need to keep that in mind. You can control that users won't break your design if they zoom in. If you are doing responsive and your design breaks when zooming in, then you're not doing it right.If you totally need to use it, then keep in mind that zooming is an important accessibility feature that is used by many people.
![karthikeya Boyini](https://www.tutorialspoint.com/assets/profiles/13518/profile/60_31598-1537784993.jpg)
179 Views
Change the setTimeout() to use a function reference. It works as the function available at the time the reference.The reference will be transferred to the timeout event callback rather than a string reference:window.setTimeout(startNow, 2000);Set it like the following:setTimeout(startNow, 1000); function startNow () { alert(‘Working correctly!'); }
![Samual Sam](https://www.tutorialspoint.com/assets/profiles/13514/profile/60_83486-1512649303.jpg)
255 Views
EaseLJS is a JavaScript library to make the HTML5 Canvas element easy. Use it for creating games, graphics, etc.To draw lines using Ticker method in HTML with easeLJS:var myLine = new createjs.Shape(); myLine.graphics.setStrokeStyle(4); myLine.graphics.beginStroke(color); myLine.graphics.moveTo(startX, startY); startY++; myLine.graphics.lineTo(startX, startY); myLine.graphics.endStroke();
![Krantik Chavan](https://www.tutorialspoint.com/assets/profiles/13545/profile/60_126883-1512724834.jpg)
78 Views
The official specification of HTML5 states:When the autofill field name is "on", the user agent should attempt to use heuristics to determine the most appropriate values to offer the user, e.g. based on the element's name value, the position of the element in the document's DOM, whaUse any of the following as values for the autocomplete attribute:)Field NameMeaning"name"Full name"honoritic-prefix"Prefix or title (e.g. "Mr.", "Ms.", "Dr.", "M||e")"given-name"Given name (in some Western cultures, also known as first name"additional-name"Additional name (in some Western cultures, also know as middle name, forenames other than the first name)"family-name"Family name (in some Western cultures, also know as ... Read More
![Lakshmi Srinivas](https://www.tutorialspoint.com/assets/profiles/13528/profile/60_91717-1512651120.jpg)
203 Views
You can try to run the following code to play and preserve the video’s last frame:var c = $('canvas')[0]; var context = canvas.getContext('2d'); c.width = 640; c.height = 480; $("#,myPlayer").on('play', function (e) { var $this = this; (function loop() { if (!$this.paused && !$this.ended) { context.drawImage($this, 0, 0, 640, 480); setTimeout(loop, 1000 / 30); } })(); });
![Vrundesha Joshi](https://www.tutorialspoint.com/assets/profiles/13566/profile/60_88163-1512715024.jpg)
174 Views
Built-in browser for Android will not give you accurate GPS location for security reasons. Test it with different web browsers that would need permissions to get the accurate location from GPS when installed.After switching GPS off, the data is received with < 10 meters accuracy.Do not use Android Browser for websites, if you want to get GPS location with high accuracy.50 meters precision can be seen for Safari browser if tested for iPhone with wifi switched off. Yes, the accuracy is lesser.
![karthikeya Boyini](https://www.tutorialspoint.com/assets/profiles/13518/profile/60_31598-1537784993.jpg)
98 Views
To retrofit, use the CSS media queries, and allow different stylesheets to different browser capabilities. A benefit is that you do not have to go for any server-side code.This would require you to add specific detection code to the script for grouping of the device.The media queries handle even devices you've never heard of.Set the following:@media handheld and (max-width: 480px), screen and (max-device-width: 480px), screen and (max-width: 600px) { body { color: blue; } }
![Nishtha Thakur](https://www.tutorialspoint.com/assets/profiles/13598/profile/60_104893-1512719058.jpg)
620 Views
To create a frame by frame animation in HTML5 with canvas, try to run the following code:var myImageNum = 1; var lastImage = 5; var context = canvas.getContext('2d'); var img = new Image; img.onload = function(){ context.clearRect( 0, 0, context.canvas.width, context.canvas.height ); context.drawImage( img, 0, 0 ); }; var timer = setInterval( function(){ if (myImageNum > lastImage){ clearInterval( timer ); }else{ img.src = "images/left_hnd_"+( myImageNum++ )+".png"; } }, 1000/15 );
![Nancy Den](https://www.tutorialspoint.com/assets/profiles/13557/profile/60_88439-1512714529.jpg)
276 Views
HTML5 applicationCacheIt can be understood by an example that a web application is cached, and accessible without a connected internet. Application cache has some advantages: users can use the application when they're offline, cached resources load faster and reduced server load. Browser cache Web browsers use caching to store HTML web pages by storing a copy of visited pages. After that, the copy is used to render when you visit that page again