9lessons programming blog
Loading Search
9lessons Bring Friends
Wall Script
Follow Me:
Monday, March 9, 2009

Twitter Like Flash Message with jQuery.

I like Twitter API method displaying information message in flash style. I had developed a small web application like twitter flash message using jQuery. It's useful and simple just enrich your web projects.

Twitter information message.

Download Script     Live Demo

Javascript Code:
You have to modify setTimeout() value.
<script type="text/javascript" 
src="http://ajax.googleapis.com/ajax/libs/
jquery/1.3.0/jquery.min.js">
</script>
<script type="text/javascript" >
 $(document).ready(function(){
  setTimeout(function(){
  $(".flash").fadeOut("slow", function () {
  $(".flash").remove();
      }); }, 2000);
 });
</script>

flash.php
Contains PHP and HTML Code.

<?php

if($_SERVER["REQUEST_METHOD"] == "POST")
{
// Some data....
$message="<div class='flash'> Information message !</div>";
}

?>


<div align="center">>
<?php echo $message; ?>
</div>


Style Sheet
CSS code.

.flash{

width:759px;
padding-top:8px;
padding-bottom:8px;
background-color: #fff;
font-weight:bold;
font-size:20px;-moz-border-radius: 6px;-webkit-border-radius: 6px;

}

Download Script     Live Demo
Comments
{ 5 comments }
ooblogger said...

Hello,

Please add your site at http://www.sweebs.com. Sweebs.com is a place where other people can find you among the best sites on the internet!
Its just started and we are collecting the best found on the net! We will be delighted to have you in the sweebs listings.

Regards
Kris

Przemyslaw said...

You can comment directly from blogger post page? Nice!

Srikanth said...

good one buddy

Anonymous said...

Hey how could I make this execute from url?
Example:
Fill out a form,
form submitted to 'submit.php' then
'submit.php' redirects to back to 'contact.php'
Then flash msg appears.

I'm still a newbie!

Anonymous said...

thkx broo...

Post a Comment