Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $(document).ready(function() {
- $("#smstext").on('keyup paste', function(){
- var Characters = $("#smstext").val().replace(/(<([^>]+)>)/ig,"").length; // '$' is missing from the selector
- $("#counter").text(Characters);
- var sms = (Characters/70*1).toFixed(0.99);
- $("#smscount").text(sms);
- $("#itog").text(sms*1.74 + 'руб.');
- });
- function toFixed( num, precision ) {
- return (+(Math.round(+(num + 'e' + precision)) + 'e' + -precision)).toFixed(precision);
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement