Skip to content

Commit

Permalink
Merge pull request #18 from zoxon/master
Browse files Browse the repository at this point in the history
More readable methods elem and block
  • Loading branch information
maxpoletaev committed Apr 25, 2016
2 parents bb1566b + 496d593 commit b3f3f63
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,15 @@ jQuery.BEM is small jQuery plugin for comfortable working with HTML made by BEM
</div>
```

### 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')
```

Expand Down

0 comments on commit b3f3f63

Please sign in to comment.