Hye_Ri_Codes

JS Indice Solara

Jul 22nd, 2022
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.33 KB | None | 0 0
  1. jQuery(function($){
  2. $("#sr-estadisticas").html(function() {
  3. return $(this).html().replace("Miembros conectados en las últimas 24 horas:", "");});
  4. });
  5. jQuery(function($){
  6. $("#sr-estadisticas").html(function() {
  7. return $(this).html().replace("Usuarios registrados: ", "");});
  8. });
  9. jQuery(function($){
  10. $("#sr-estadisticas").html(function() {
  11. return $(this).html().replace(" El último usuario registrado es ", "");});
  12. });
  13. jQuery(function($){
  14. $("#sr-estadisticas").html(function() {
  15. return $(this).html().replace("Tenemos ", "");});
  16. });
  17.  
  18.  
  19. $(document).ready(function(){
  20. $('#sr-estadisticas br:first-child').remove();
  21. });
  22.  
  23.  
  24. /*VISTO*/
  25. $(document).ready(function replaceTotalUsersOnline (){
  26. const string = $('.e1-nm').text();
  27. const numbers = string.match(/\d+/g).map(Number);
  28. $('.e2nm-1').html(numbers[4] + ' <b>online</b><i class="fa-solid fa-wifi"></i>');
  29. $('.e2nm-2').html(numbers[1] + ' <b>members</b><i class="fa-solid fa-user-group"></i>');
  30. $('.e2nm-3').html(numbers[2] + ' <b>guest</b><i class="fa-solid fa-user-secret"></i>');
  31. });
  32.  
  33.  
  34. $(document).ready(function(){
  35. $('.tab-cuerpo').appendTo('.st-temas');
  36. $('#comments_scroll_div').hover( function(){$('.js-marquee-wrapper').css('animation-play-state','paused')}, function(){$('.js-marquee-wrapper').css('animation-play-state','running')});
  37. });
  38.  
  39.  
  40. $(document).ready(function(){
  41.  
  42.  
  43. const sliderElm = document.querySelector(".time-0 .time-slide");
  44. const btnLeft = document.querySelector(".time-0 .time-prev");
  45. const btnRight = document.querySelector(".time-0 .time-next");
  46.  
  47. const numberSliderBoxs = sliderElm.children.length;
  48. let idxCurrentSlide = 0;
  49.  
  50. // Functions:
  51. function moveSlider() {
  52. let leftMargin = (sliderElm.clientWidth / numberSliderBoxs) * idxCurrentSlide;
  53. sliderElm.style.marginLeft = -leftMargin + "px";
  54. console.log(sliderElm.clientWidth, leftMargin);
  55. }
  56. function moveLeft() {
  57. if (idxCurrentSlide === 0) idxCurrentSlide = numberSliderBoxs - 1;
  58. else idxCurrentSlide--;
  59.  
  60. moveSlider();
  61. }
  62. function moveRight() {
  63. if (idxCurrentSlide === numberSliderBoxs - 1) idxCurrentSlide = 0;
  64. else idxCurrentSlide++;
  65.  
  66. moveSlider();
  67. }
  68.  
  69. // Event Listeners:
  70. btnLeft.addEventListener("click", moveLeft);
  71. btnRight.addEventListener("click", moveRight);
  72. window.addEventListener("resize", moveSlider);
  73.  
  74. });
Advertisement
Add Comment
Please, Sign In to add comment