Lakshmi Srinivas

Lakshmi Srinivas

232 Articles Published

Articles by Lakshmi Srinivas

Page 6 of 24

Top frameworks for HTML5 based mobile development

Lakshmi Srinivas
Lakshmi Srinivas
Updated on 15-Mar-2026 309 Views

The following are some of the top frameworks for HTML5 based mobile development, each offering unique advantages for creating cross-platform mobile applications: Kendo UI Kendo UI provides a comprehensive suite of HTML5 UI widgets and tools for building cross-platform mobile applications. It offers native-like performance and appearance across different devices and operating systems. // Basic Kendo UI Mobile App initialization var app = new kendo.mobile.Application(document.body, { transition: 'slide', layout: 'tabstrip-layout' }); Bootstrap Bootstrap is a responsive front-end framework that supports HTML, CSS, and JavaScript for ...

Read More

Upload directly to Amazon S3 using Plupload HTML5 runtime

Lakshmi Srinivas
Lakshmi Srinivas
Updated on 15-Mar-2026 200 Views

Amazon S3 supports cross-origin resource sharing (CORS), enabling direct HTML5 file uploads from web browsers using Plupload. This eliminates the need for server-side proxies and provides a more efficient upload experience. What is CORS in Amazon S3? Cross-Origin Resource Sharing (CORS) allows web applications running on one domain to make requests to Amazon S3 buckets on a different domain. Without CORS, browsers block these cross-origin requests for security reasons. Setting Up CORS Configuration First, configure your S3 bucket's CORS policy to allow uploads from your domain: { "CORSRules": [ ...

Read More

How to set the top margin of an element with JavaScript?

Lakshmi Srinivas
Lakshmi Srinivas
Updated on 15-Mar-2026 2K+ Views

In JavaScript, you can set the top margin of an element using the marginTop property. This property allows you to dynamically modify the spacing above an element, making it useful for responsive layouts and interactive designs. Syntax element.style.marginTop = "value"; The value can be specified in various CSS units like pixels (px), percentages (%), em, rem, etc. Example #myID { border: 2px solid #000000; ...

Read More

How [ ] is converted to Number in JavaScript?

Lakshmi Srinivas
Lakshmi Srinivas
Updated on 15-Mar-2026 274 Views

In JavaScript, an empty array [] converts to the number 0 when using type coercion. This happens through a multi-step conversion process that JavaScript performs automatically. How the Conversion Works When converting [] to a number, JavaScript follows these steps: First, it calls the valueOf() method on the array, which returns the array itself Since the result isn't a primitive, it calls toString() on the array An empty array's toString() returns an empty string "" Finally, the empty string converts to 0 Using Number() Method ...

Read More

HTML5 getCurrentPosition almost always failing in PhoneGap on iOS

Lakshmi Srinivas
Lakshmi Srinivas
Updated on 15-Mar-2026 149 Views

When using HTML5 geolocation in PhoneGap applications on iOS devices, getCurrentPosition may fail frequently, especially on iOS 6. This issue affects location-based functionality and requires specific configuration changes to resolve. The Problem PhoneGap's geolocation API generally works well on iOS, but iOS 6 introduced specific issues where getCurrentPosition consistently triggers the failure callback instead of successfully retrieving the device's location. PhoneGap Configuration Fix The primary solution involves modifying the PhoneGap.plist file configuration: // In PhoneGap.plist, set the geolocation setting to: GeolocationEnabled: NO Setting this value to YES causes memory problems on iOS ...

Read More

How to use FastClick with jQuery Mobile the right way in HTML?

Lakshmi Srinivas
Lakshmi Srinivas
Updated on 15-Mar-2026 229 Views

FastClick is a library that eliminates the 300ms delay on mobile browsers for touch events. However, jQuery Mobile provides a built-in solution with the vclick event that handles this automatically. The Problem with Mobile Touch Delays Mobile browsers introduce a 300ms delay between a touch event and the click event to detect double-taps. This creates a sluggish user experience on mobile web applications. jQuery Mobile's Built-in Solution jQuery Mobile includes virtual events like vclick that provide immediate response without the 300ms delay. This eliminates the need for external libraries like FastClick. Using vclick Event ...

Read More

How [ ] is converted to Boolean in JavaScript?

Lakshmi Srinivas
Lakshmi Srinivas
Updated on 15-Mar-2026 227 Views

In JavaScript, an empty array [] is considered a truthy value when converted to Boolean. This might seem counterintuitive, but it follows JavaScript's type coercion rules for objects. Converting [] to Boolean Use the Boolean() method to explicitly convert an empty array to Boolean: Convert [] to Boolean var myVal = []; document.write("Boolean: " + Boolean(myVal)); ...

Read More

Comparison of CSS versions

Lakshmi Srinivas
Lakshmi Srinivas
Updated on 15-Mar-2026 2K+ Views

Cascading Style Sheets (CSS) has evolved significantly since its inception. Understanding the differences between CSS versions helps developers choose the right features for their projects and maintain browser compatibility. CSS1 (1996) CSS1 became a W3C recommendation in December 1996. This initial version introduced the fundamental CSS language and a basic visual formatting model for HTML elements. It provided essential styling capabilities like fonts, colors, margins, and borders. CSS2 (1998) CSS2 became a W3C recommendation in May 1998, building upon CSS1 with significant enhancements: Media-specific style sheets for printers and aural devices Downloadable fonts support ...

Read More

Example of embedded CSS

Lakshmi Srinivas
Lakshmi Srinivas
Updated on 15-Mar-2026 7K+ Views

Embedded CSS allows you to place CSS rules directly within an HTML document using the element. This tag is placed inside the section, and the rules defined will apply to all elements in the document. Syntax /* CSS rules go here */ selector { property: value; } ...

Read More

Which Measurement Unit should be used in CSS to set letter spacing

Lakshmi Srinivas
Lakshmi Srinivas
Updated on 15-Mar-2026 973 Views

To set letter spacing with CSS, use the em measurement unit for most cases, though other units like px and rem are also available depending on your needs. The em unit is a relative measurement based on the font size of the current element. Because an em unit equals the size of the current font, if you assign a font to 12pt, each "em" unit would be 12pt; thus, 2em would be 24pt. Why Use em for Letter Spacing? Using em units makes letter spacing responsive and proportional to the font size. When the font size changes, ...

Read More
Showing 51–60 of 232 articles
« Prev 1 4 5 6 7 8 24 Next »
Advertisements