Jquery

4th
Mar

Here’s what happened to us with my buddy Aftab. I had designed the form like this.

input

The inputs have the values of username and password. Just by looking at it you will think that all we have do in the code is like this

<input name="username" value="username" value="username" />
<input name="password" value="password" value="password"/>

Yes that’s true, but only in the username input will show the word and the password inputs will show dots.

inputPassword

I tried to use jquery .val() in the password but I’m still having the same result. So I came across facebook login and see how they’re doing this trick. And that’s the time I call aftab and we checked on firebug.

You have to open firebug to see the magic. On default, the input password it’s like this

<input name="password" type="text" value="Password" />

Once you clicked, the input will changing to

<input name="password" type="password" />

You can achieve this using jquery on .focus(). Here’s the code.

CSS:

#rlPass{
    display:none;
}

HTML

<input id="loginPass" type="text" value="Password"  />
<input id="rlPass" type="password" />

JQUERY

$(document).ready(function() {
    $("#loginPass").focus(function(){
        $(this).hide();
        $("#rlPass").css("display", "inline");
    });
})
18th
Sep

You may already saw this in some other website scrolling horizontal and vertical smoothly with easing. I will show you how to do this using jquery scrollTo plugin. I’m not going show you the full details about this plugin. You can visit Ariel Flesler : jquery.ScrollTo to see detailed instruction and more settings.

Read the rest of this entry »

1st
Jul

Simple Animation Using jquery

Last week our Team Head asked me to edit some pictures for his friend’s employees. These pictures are for passport use so I removed the colored background and changed it into white. So, I’ve done all of it and I send it back with plain white background. After that I started to play with it until I feel half happy with the result and add some animation in jquery.

Read the rest of this entry »


Daily Tweets

RT: @zeldman: In A List Apart 302: Flash and Standards: The Cold War of the Web by Daniel Mall. http://j.mp/aPFK4x
bonandrion@gmail.com
+97155.415.50.42