Advertisement
Guest User

Untitled

a guest
Feb 27th, 2015
229
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.41 KB | None | 0 0
  1. function buttons(){
  2. if($("#1").is(":visible")){
  3. $("#prev").hide();
  4. }else{
  5. $("#prev").show();
  6. }
  7. if($("#<?php echo $anzahl; ?>").is(":visible")){
  8. $("#next").hide();
  9. }else{
  10. $("#next").show();
  11. }
  12. }
  13. buttons();
  14.  
  15. function next(){
  16. var firstvisible = $(".thumbprofilpic:visible:first").attr("id");
  17. var lastvisible = $(".thumbprofilpic:visible:last").attr("id");
  18. var shownextpic = parseInt(lastvisible) + 1;
  19. var hideprevpic = parseInt(firstvisible);
  20. $('#' + hideprevpic).hide();
  21. $('#' + shownextpic).show();
  22. var selected = '<img src="' + $('#' + lastvisible).attr('src') + '">';
  23. var bild = selected.replace("/klein/", "/normal/");
  24. $("#previewprofil").html(bild);
  25. buttons();
  26. }
  27.  
  28. function prev(){
  29. var firstvisible = $(".thumbprofilpic:visible:first").attr("id");
  30. var lastvisible = $(".thumbprofilpic:visible:last").attr("id");
  31. var showprevpic = parseInt(firstvisible) - 1;
  32. var hidenextpic = parseInt(lastvisible);
  33. $('#' + showprevpic).show();
  34. $('#' + hidenextpic).hide();
  35. var selected = '<img src="' + $('#' + firstvisible).attr('src') + '">';
  36. var bild = selected.replace("/klein/", "/normal/");
  37. $("#previewprofil").html(bild);
  38. buttons();
  39. }
  40.  
  41. function picid(z){
  42. var selected = '<img src="' + $(z).attr('src') + '">';
  43. var bild = selected.replace("/klein/", "/normal/");
  44. $("#previewprofil").html(bild);
  45. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement