Arquivo da tag: jQuery

Máscara de telefones usando jQuery Mask Plugin

jQuery("input.telefone")
        .mask("(99) 9999-9999?9")
        .focusout(function (event) {  
            var target, phone, element;  
            target = (event.currentTarget) ? event.currentTarget : event.srcElement;  
            phone = target.value.replace(/\D/g, '');
            element = $(target);  
            element.unmask();  
            if(phone.length > 10) {  
                element.mask("(99) 99999-999?9");  
            } else {  
                element.mask("(99) 9999-9999?9");  
            }  
        });
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery.maskedinput/1.4.1/jquery.maskedinput.min.js"></script>
Telefone: <input type="text" class="telefone" />
https://pt.stackoverflow.com/questions/42238/m%C3%A1scara-de-telefones-usando-jquery-mask-plugin

Ruby on Rails unobtrusive scripting adapter for jQuery

jQuery – Votação com estrelas [ star rating ] via Ajax

Html e CSS
[code type=html]


  • MacBook

  • iMac

  • iPhone

  • iPod Nano

  • iPod Classic

  • HP_LP3065


Javascript:
[code type=javascript]

Server in PHP:
[code type=php]

http://wbruno.com.br/ajax/votacao-estrelas-star-rating-ajax-jquery