The Twitter new web interface design is live for many more today. The makeover of the new Twitter was really fantastic, In this post I decided to explain how to implement new Twitter user interface design with CSS and JQuery. Use it and enrich your web applications. Take a look at this awesome demo.

Step 1

First create a DIV element with attribute ID value. The layar contains of two DIV elements attribute class valuesand

<div id=' container '>

<div class=' right '></div>

<div class=' left '></div>

</div>

Step 2

Now create aDIV element inside theDIV. This layer contain a DIV element attribute class value(sliding or rolling).

<div id=' container '>

<div class=' right '></div>

<div id=" panel-frame ">

<div class=" panel "></div>

</div>

<div class=' left '></div>

</div>

Step 3

Here the final HTML code ready. Now using jQuery to sliding or rolling the

<div id=' container '>

// Right part

<div class=' right '>

</div>



<div id=" panel-frame ">

<div class=" panel ">

<div class=" head "> <a href=" # " class=" close "> Close </a> </div>

<div class=" data ">

// jquery id

</div>

</div>

</div>



//Left Part

<div class=" left ">

// Message display here

<div class=" block " id=" 1 ">1</div>

<div class=" block " id=" 2 ">2</div>

...............................

...............................

</div>



</div>

is the class name of DIV tag. Using- calling DIV tagvalue.

<script type=" text/javascript " src=" http://ajax.googleapis.com/

ajax/libs/jquery/1.4.2/jquery.min.js " > </script>

<script type=" text/javascript " >

$( document ). ready (function()

{



$( '.block' ). click (function()

{

var id= $( this ). attr ( 'id' ); // .block ID

var data_id= $( ".data" ). html (); // .data DIV value

var panel= $( '.panel' );

var panel_width=$( '.panel' ).css( 'left' ); // rolling panel width





if (data_id == id)

{

// Rolling Animation

panel. animate ({left: parseInt (panel. css ( 'left' ), 0 ) == 0 ? +panel. outerWidth () : 0 });

}

else

{

// panel width CSS width:340px + border:1px = 341px

if (panel_width==' 341 px')

{

// No rolling animation

}

else

{

// Rolling Animation

panel. animat e({left: parseInt (panel. css ( 'left' ), 0 ) == 0 ? +panel. outerWidth () : 0 });

}

}

// passing id value to <div class='data'$gt; </div>

$( '.data' ). html (id);

return false;

});



// panel close link

$( '.close' ). click (function()

{

var panel= $( '.panel' );

panel. animat e({left: parseInt (panel.css('left'), 0 ) == 0 ? +panel. outerWidth () : 0 });

return false;

});



});

</script>