Wednesday, December 26, 2012

Disable Active page When loading start

Open jquerymobile.js  and find below text

<span class='ui-icon ui-icon-loading'></span>

add one div element before the span like: 
<div class='inner_loader ui-loader-verbose'>

and end it after the h1 tag, that is created after span.
and add below css in your style.css.

Regular expresion to validate URL

var url = value.v_url;

var pattern = /(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/;

if (pattern.test(url)) {
        content+='<a href="'+value.v_url+'" target="_blank">'; //  Url is valid
}
else{
        console.log("invalid url");
}

Tuesday, September 25, 2012

Mobile website not fit to the screen.


Open the Html file and write below code in the first line.

For Mobile site:


<!DOCTYPE html PUBLIC “-//WAPFORUM//DTD XHTML Mobile 1.0//EN” “http://www.wapforum.org/DTD/xhtml-mobile10.dtd”>


If Doctype is already exist like below then replace it.

For Desktop site.


<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>





Wednesday, September 12, 2012

Password Protect Directory using .htaccess

1) Create new .htaccess
and write below code in the .htaccess file.

AuthName "Section Name"
AuthType Basic
AuthUserFile /home/username/.htpasswds
Require valid-user

Wednesday, August 29, 2012

Box Shadow using CSS3

Hello Guys.
There are basically two types of the shadow to box. one is outer its looks like the glow and some times it gives 3D effects. and another is for the inner glow or inner shadow.
instead of CSS3, we have to use image for the shadow, glow and inner shadow.
so its speedy and easy to change.

1) Outset Glow

Syntax Attributes: 


Inset: NO
Horizontal Length: 5px
Vertical Length: 4px
Blur Radius: 50px
Spread: 1px
Hex: #000000