Advertisement
ShineKami

JS функциона

Dec 18th, 2014
232
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.36 KB | None | 0 0
  1. //////////////////////////////////////
  2. //The functional design
  3. //Author: ShineKami
  4. //Web-site: http://WebGod-Studio.ru/
  5. //////////////////////////////////////
  6. function rotate(){
  7. var first = $('#slideSelect');
  8. $('.slider #'+$('#slideSelect').removeAttr("id").attr('class')).animate({opacity:'0'},"slow").hide("slow");
  9. if(!first.next().attr('class'))
  10. $('.slider #'+$('.slider .selSlide li:eq(0)').attr('id', 'slideSelect').attr('class')).show().animate({opacity:'1'},"slow");
  11. else
  12. $('.slider #'+first.next().attr('id', 'slideSelect').attr('class')).show().animate({opacity:'1'},"slow");
  13. }
  14. function theRotator() {
  15. setInterval('rotate()',10000);
  16. }
  17.  
  18. $(document).ready(function() {
  19. ///////Слайдер///////
  20. $('.slider #'+$('#slideSelect').attr('class')).show().animate({opacity:'1'},"slow");
  21. $(".slider li").click(function(){
  22. if(!$(this).attr('id'))
  23. {
  24. $('.slider #'+$('#slideSelect').removeAttr("id").attr('class')).animate({opacity:'0'},"slow").hide("slow");
  25. $('.slider #'+$(this).attr('id', 'slideSelect').attr('class')).show().animate({opacity:'1'},"slow");
  26. }
  27. });
  28. if($(".slider .selSlide li").length>1) theRotator();
  29.  
  30. ////////BB-Codes////////
  31. //hint
  32. $(".RaspFullBlock .p2").hover(
  33. function(){
  34. $("#hovWin", this).delay(500).show('slow');
  35. },
  36. function(){
  37. $("#hovWin", this).stop(true, true).hide('slow');
  38. }
  39. );
  40. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement