Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*------------------------------------------------
- Form group blue line
- -------------------------------------------------*/
- if($('.form-group--float')[0]) {
- $('.form-group--float').each(function () {
- var c = $(this).find('.form-control')
- var p = c.val()
- if(!p.length == 0) {
- c.addClass('form-control--active');
- }
- c.change(function () {
- var x = $(this).val();
- if(!x.length == 0) {
- $(this).addClass('form-control--active');
- }
- });
- });
- $('body').on('blur', '.form-group--float .form-control', function(){
- var i = $(this).val();
- if (i.length == 0) {
- $(this).removeClass('form-control--active');
- }
- else {
- $(this).addClass('form-control--active');
- }
- });
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement