Advertisement
blondeweb

Untitled

Dec 31st, 2014
2,863
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Nagios 1.73 KB | None | 0 0
  1. $(window).load(function(){
  2.   /* class operation */
  3.  
  4.   $('.insNome').hide();
  5.   $('.res').hide();
  6.   $('.optG').hide();
  7.  
  8.   /* */
  9.  
  10.   $('.c').keyup(function(e){
  11.     var num = $(this).val();
  12.     var v = 200;
  13.     if(num.length == "200"){
  14.       $('.c').attr('maxlength', 200);
  15.       $('.count').html(v - num.length);
  16.     }else{
  17.       $('.count').html(v - num.length);
  18.     }
  19.    
  20.   });
  21.  
  22.   $('.anon').click(function(){
  23.     $('.insNome').toggle();
  24.   });
  25.  
  26.   $('.insNome').keyup(function(e){
  27.     $('.insNome').attr('maxlength', 25);
  28.     if(e.keyCode == 13){
  29.       var nome = $(this).val();
  30.       if(nome == ""){
  31.         $('.insNome').attr("placeholder", "Digite um nome");
  32.       }else if(nome.length <= 5){
  33.          $('.insNome').val("");
  34.          $('.insNome').attr("placeholder", "Nome pequeno");
  35.       }else{
  36.         nome = nome.replace(',','').replace(/,+$/, "");
  37.         nome = nome.replace('-','').replace(/,+$/, "");
  38.         nome = nome.replace('_','').replace(/,+$/, "");
  39.         nome = nome.replace('!','').replace(/,+$/, "");
  40.         $('.nome').html(nome);
  41.         $('.insNome').val("");
  42.       }
  43.     }
  44.   });
  45.  
  46.   $('.opt').click(function(){
  47.     $('.optG').toggle();
  48.   });
  49.  
  50.   $(".fancybox").fancybox();
  51.  
  52.   $(".fancybox").fancybox({
  53.     helpers : {
  54.         overlay : {
  55.             css : {
  56.                 'background' : 'rgba(18, 8, 8, 0.85)'
  57.             }
  58.         }
  59.     }
  60.    });
  61.    
  62.   $(".fancybox").fancybox({
  63.     beforeShow : function() {
  64.         var alt = this.element.find('img').attr('alt');
  65.        
  66.         this.inner.find('img').attr('alt', alt);
  67.        
  68.         this.title = alt;
  69.     }
  70.   });
  71.  
  72.   $(".fancybox")
  73.     .attr('rel', 'gallery')
  74.     .fancybox({
  75.         padding : 0
  76.   });
  77.  
  78.     var url = $('.redir').html();
  79.     if(url){
  80.       location.href=url;
  81.     }else{
  82.       //
  83.     }
  84. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement