From 496d5937926aaa20084af2be2606617dec960244 Mon Sep 17 00:00:00 2001 From: Velichko Konstantin Date: Mon, 25 Apr 2016 15:37:28 +0600 Subject: [PATCH] More readable methods elem and block https://github.com/zenwalker/jquery-bem/issues/17 --- README.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 7dc1eab..2d377fc 100644 --- a/README.md +++ b/README.md @@ -15,8 +15,15 @@ jQuery.BEM is small jQuery plugin for comfortable working with HTML made by BEM ``` +### Getting block + +```javascript +$('.b-product:first').elem('name').block(); // $('.b-product:first > .b-product__name').closest('.b-product') +``` + +### Getting element + ```javascript -$('.b-product:first').elem('name'); // $('.b-product:first > .b-product__name') $('.b-product:first').elem('name').block(); // $('.b-product:first > .b-product__name').closest('.b-product') ```