Sha256: eaff213c770df25344612b826bfd1311f5105b3dac4396ef6f4d1e1eae16d8e5
Contents?: true
Size: 391 Bytes
Versions: 5
Compression:
Stored size: 391 Bytes
Contents
$(document).ready(function() { // automatic slug from snippet name $('#snippet_name').keypress(function() { var input = $(this); var slug = $('#snippet_slug'); if (!slug.hasClass('filled')) { setTimeout(function() { slug.val(input.val().replace(/\s/g, '_').toLowerCase()); }, 50); } }); $('#snippet_slug').keypress(function() { $(this).addClass('filled'); }); });
Version data entries
5 entries across 5 versions & 1 rubygems