Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update README.md #639

Open
wants to merge 1 commit into
base: gh-pages
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions plugins/aspectratio/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,16 @@ Example values for an image with a width of 400 and a height of 200 (all mean th
In case new elements are added to the DOM the global ``imageRatio.processImages`` method can be used. The method takes either an element representing the container/wrapper of the new elements or a list of image elements:

```js
imageRatio.processImages(document.querySelector('#dynaimc-wrapper');
imageRatio.processImages(document.querySelectorAll('#dynaimc-wrapper img[data-aspectratio]');
imageRatio.processImages(document.querySelector('#dynamic-wrapper');
imageRatio.processImages(document.querySelectorAll('#dynamic-wrapper img[data-aspectratio]');
```

In case jQuery, ZEPTO, shoestring or another jQuery-like library is used the ``imageRatio`` plugin is added also:

```js
$('.dynamic-wrapper').imageRatio();
$('.

').imageRatio();
$('.dynamic-wrapper img[data-aspectratio]').imageRatio();
```

Expand Down