function parentFocus(selector, container) {

  $(selector).focus(function() {
    $(this).closest(container).addClass('is-focused');
  });
  $(selector).blur(function() {
    $(this).closest(container).removeClass('is-focused');
  });
  $(selector).mouseenter(function() {
    $(this).closest(container).addClass('is-focused');
  });
  $(selector).mouseleave(function() {
    $(this).closest(container).removeClass('is-focused');
  });
}
// add a state class to the parent
add a state class to the parent
add a state class to the parent
function parentFocus(selector, container) {
  $(selector).focus(function() {
    $(this).closest(container).addClass('is-focused');
  });
  $(selector).blur(function() {
    $(this).closest(container).removeClass('is-focused');
  });
  $(selector).mouseenter(function() {
    $(this).closest(container).addClass('is-focused');
  });
  $(selector).mouseleave(function() {
    $(this).closest(container).removeClass('is-focused');
  });
}
function parentFocus ( selector , container ) { $ ( selector ) . focus ( function ( ) { $ ( this ) . closest ( container ) . addClass ( 'is-focused' ) ; } ) ; $ ( selector ) . blur ( function ( ) { $ ( this ) . closest ( container ) . removeClass ( 'is-focused' ) ; } ) ; $ ( selector ) . mouseenter ( function ( ) { $ ( this ) . closest ( container ) . addClass ( 'is-focused' ) ; } ) ; $ ( selector ) . mouseleave ( function ( ) { $ ( this ) . closest ( container ) . removeClass ( 'is-focused' ) ; } ) ; }
add a state class to the parent
add a state class to the parent