Sha256: 15bca962355ed2da30e3bc93ec395543efe7fc8754486f897c1aa70b2d614ad3
Contents?: true
Size: 567 Bytes
Versions: 59
Compression:
Stored size: 567 Bytes
Contents
function initTricks() { var labels = $('.floating-placeholder label'); labels.each(function(i) { var ph = $(labels[i]) .siblings('input') .first() .attr('placeholder'); $(labels[i]).html(ph); }); } $(document).ready(function() { $('.floating-placeholder input').keyup(function() { var input = $(this).val(); if(input) $(this).parent().addClass('float'); else $(this).parent().removeClass('float'); }); $('#form').submit(function(e) { e.preventDefault(); }); initTricks(); })
Version data entries
59 entries across 59 versions & 1 rubygems