Skip to content

Instantly share code, notes, and snippets.

View asyndrige's full-sized avatar

Stanislaw asyndrige

View GitHub Profile
$(document).ready(function() {
$('.field_name').append('<div class="name_counter" style="display:inline;">'+$('#StoreProduct_name').val().length+'/60</div>');
$('#StoreProduct_name').keyup(function() {
$('.name_counter').empty();
$('.name_counter').append($(this).val().length + '/60');
});
$('.field_meta_title').append('<div class="meta_title_counter" style="display:inline;">'+$('#StoreProduct_meta_title').val().length+'/70</div>');
$('#StoreProduct_meta_title').keyup(function() {
$('.meta_title_counter').empty();