Created
August 9, 2013 06:29
-
-
Save sajadplusweb/6191550 to your computer and use it in GitHub Desktop.
Revisions
-
sajad created this gist
Aug 9, 2013 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,3 @@ <div class="box"> <p>متن توضیح</p> </div> This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,15 @@ $(function(){ $('.box').mouseenter(function(){ $(this).animate({ "width" : "170px" }); $('p').delay(1000).animate({ "opacity" : "1" },200); }).mouseleave(function(){ $('p').css("opacity" , "0"); $(this).animate({ "width" : "120px" }); }); }) This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,16 @@ .box{ width:120px; height:100px; background:red; transition:width 0.5s; float: left; position: relative; } p{ font-family: tahoma; color:#fff; position: absolute; top:20px; right:0; opacity:0; }