Browse Source

docs : help : accessing the instance

pull/96/head
David DeSandro 13 years ago
parent
commit
443a33de5c
  1. 22
      _posts/docs/2011-12-11-help.mdown

22
_posts/docs/2011-12-11-help.mdown

@ -10,6 +10,7 @@ toc:
- { title: Unloaded media, anchor: unloaded_media }
- { title: Images, anchor: images }
- { title: @font-face fonts, anchor: fontface_fonts }
- { title: Accessing the instance, anchor: accessing_the_instance }
- { title: CSS transforms in Opera, anchor: css_transforms_in_opera }
- { title: Infinite Scroll with filtering or sorting, anchor: infinite_scroll_with_filtering_or_sorting}
- { title: Flash, anchor: flash }
@ -96,6 +97,27 @@ Both Typekit and Google WebFont Loader provide font events to control scripts ba
+ [Typekit font events](http://blog.typekit.com/2010/10/18/more-control-with-typekits-font-events/)
+ [Google WebFont Loader: Events](http://code.google.com/apis/webfonts/docs/webfont_loader.html#Events)
## Accessing the instance
[Similar to jQuery UI](http://docs.jquery.com/UI_Developer_Guide#Internal_functions_.26_scopes_explained), Isotope stores a instance containing properties, settings and methods with jQuery.data. You can access the instance with the `'isotope'` namespace.
{% highlight javascript %}
var $container = $('#container');
// initialize Isotope instance
$container.isotope({
// options...
});
// get Isotope instance
var isotopeInstance = $container.data('isotope');
isotopeInstance.options; // options
isotopeInstance.$filteredAtoms; // jQuery object of filtered & sorted item elements
isotopeInstance.masonry.columnWidth; // Layout mode specific properties
{% endhighlight %}
## CSS transforms in Opera
Currently, [using CSS transforms in Opera distorts text rendering](http://dropshado.ws/post/1260101028/opera-transform-issues). To avoid this issue, I recommend disabling Isotope to use transforms.

Loading…
Cancel
Save