Skip to content

If in one dom element has block and element, how switch to block? #20

@zoxon

Description

@zoxon
textarea.textarea.textarea__control
$('.textarea').each(function(index, el) {
    var $that = $(this);
    var $control = $that.elem('control');

    $control.focusin(function(event) {
        $(this).block().mod('focused', true);
    });

    $control.focusout(function(event) {
        $(this).block().mod('focused', false);
    });
});

JqueryBEM add modifer to element .textarea.textarea__control_focused

http://codepen.io/Zoxon/pen/wGRrQo

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions