Guest User

Untitled

a guest
Jan 21st, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.48 KB | None | 0 0
  1. $(function(){
  2. // resizable
  3. $('.formdiv textarea').attr('class','resizable');
  4. //$('input[type=file]').wrap("<div class=filediv></div>");
  5. // всплывающие подсказки
  6. $('body').mousemove(function(e){
  7. X=e.pageX;
  8. Y=e.pageY;
  9. });
  10. $('.tlt').mouseover(function(){
  11. tlt=$(this).attr('tlt');
  12. $('#tlt').css({opacity:0.0})
  13. .html("<div class='arr pa'></div>"+tlt)
  14. .show()
  15. .animate({opacity:1.0},300);
  16.  
  17. }).mousemove(function(){
  18. $('#tlt').css({top:Y-($('#tlt').height()+30)+'px',left:X-15+'px'});
  19. }).mouseleave(function(){
  20. $('#tlt').hide();
  21. });
  22. // menutop
  23. $('.menutop .item').mouseenter(function(){
  24. if($(this).attr('class')!='item open fl'){
  25. $(this).css(
  26. {
  27. border:"1px solid #818896",
  28. background:"#969fb3"
  29. }
  30. ).animate({opacity:1.0},200);
  31. }
  32. }).mouseleave(function(){
  33. if($(this).attr('class')!='item open fl'){
  34. $(this).css(
  35. {
  36. border:"1px solid #969fb3",
  37. background:"none"
  38. }
  39. ).animate({opacity:0.5},100);
  40. }
  41. });
  42. // menutop
  43. $('#menu a').mouseover(function(){
  44. if($(this).attr('class')!='open'){
  45. var name=$(this).attr('name');
  46. if(name!=''){
  47. if(typeof(oldname)=='undefined' || name!=oldname){
  48. $('#menu div[class=]').slideUp(200);
  49. $('#menu div[name='+name+']').slideDown(200);
  50. oldname=name;
  51. }
  52. }
  53. }
  54. else{
  55. $('#menu div[class=]').slideUp(200);
  56. oldname=name;
  57. }
  58. });
  59. $('#menu div[name='+$('#menu a.open').attr('name')+']').show().attr('class','opened');
  60. // krowki
  61. zInd=10;
  62. $('#krowki .item').each(function(){
  63. $(this).css('zIndex',zInd);
  64. zInd-=1;
  65. }).mouseover(function(){
  66. $(this).css(
  67. {
  68. background:"#969fb3",
  69. border:"1px solid #7a8191"
  70. }
  71. );
  72. $(this).find('.l').css({backgroundPosition:'0px -69px'});
  73. $(this).find('.r').css({backgroundPosition:'0px -23px'});
  74. }).mouseleave(function(){
  75. $(this).css(
  76. {
  77. background:"#6c7488",
  78. border:"1px solid #585e6e"
  79. }
  80. );
  81. $(this).find('.l').css({backgroundPosition:'0px -92px'});
  82. $(this).find('.r').css({backgroundPosition:'0px 0px'});
  83. });
  84. // toggle menu
  85. $('#togglemenu').click(function(){
  86. if($('.left').css('display')=='block'){
  87. $('.left').slideUp(100);
  88. $('.right').delay(120).animate({width:'1165px'},300);
  89. $(this).css({backgroundPosition:'0px -41px'});
  90. }
  91. else{
  92. $('.right').animate({width:'870px'},300);
  93. $('.left').delay(320).slideDown(100);
  94. $(this).css({backgroundPosition:'0px 0px'});
  95. }
  96. });
  97.  
  98. });
Add Comment
Please, Sign In to add comment