Advertisement
Hardrockdesign

Javascripts Parade

Jun 4th, 2015
2,392
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.77 KB | None | 0 0
  1. ----------------------- CAJA DE PERFIL 1 -----------------------
  2.  
  3. $(function() {
  4. for (var a = document.getElementsByTagName('SPAN'), i = 0, j = a.length, label; i<j; i++) {
  5.  
  6. if (/profileField/.test(a[i].className)) {
  7. label = a[i].innerHTML.replace(/<.*?>/g,'').replace(/:.*$/,'').replace(/^\s+|\s+$/g,'');
  8.  
  9. switch (label) {
  10.  
  11. case 'Foto identificativa' :
  12. a[i].className += ' field-userpic';
  13. break;
  14.  
  15. case 'Mensajes' :
  16. a[i].className += ' field-msg';
  17. break;
  18.  
  19. case 'Fecha de inscripción' :
  20. a[i].className += ' field-fecha';
  21. break;
  22.  
  23. }
  24.  
  25. }
  26.  
  27. }
  28. });
  29.  
  30. ----------------------- CAJA DE PERFIL 2 -----------------------
  31.  
  32. $(document).ready(function(){
  33. $("#pestanas li").click(function() {
  34. currentprofile = $(this).parent().parent().parent().parent();
  35. $("#pestanas li", currentprofile).removeClass('active');
  36. $(this).addClass("active");
  37. $(".tab_content", currentprofile).hide();
  38. var selected_tab = $(this).find("a").attr("href");
  39. $(selected_tab, currentprofile).fadeIn();
  40. return false;
  41. });
  42. });
  43.  
  44. ----------------------- DESCONECTARSE -----------------------
  45.  
  46. jQuery(document).ready(function(){
  47.  
  48. jQuery('a.mainmenu[href^="/login?logout=1"]').html('Desconectarse');
  49.  
  50. });
  51.  
  52. ----------------------- CAMBIOS DE NOMBRE -----------------------
  53.  
  54. $(function(){
  55. $("p.page-bottom").each(function(){
  56. $(this).html($(this).html()
  57. .replace("Nuestros miembros han publicado un total de", "Total de ")
  58. .replace("Tenemos", " ")
  59. .replace("publicaciones", " ")
  60. .replace("El último usuario registrado es", "Recién llegado"));
  61. });
  62. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement