- Visibility - Fixed bug that could cause
onScreen
callback to not occur properly for elements that are taller than screen.
- Visibility - Fixes issue where
bottomPassed
andtopPassed
would not fire under some conditions
- Popup - Separated className setting for
visible
intovisible
andpopupVisible
, this way you can remove visible indication on activating element without modifying popup visibility.
- Visibility - Visibility events now fire correctly when using
context
other than body that hasoverflow-x
oroverflow-y
set toauto
orscroll
- Visibility - Fixed bug where using visibility with
context
setting on a scrollable context (with overflow) would cause callbacks to fire incorrectly - Visibility - Fixed bug where
top passed
andbottom passed
would appear as incorrect values if using settings fromget element calculations
when element is off screen.
- Visibility - Added documentation for
onOnscreen
andonOffScreen
, two very important callbacks that occur when an element is or isn't in currently scrolled view. - Visibility - Images that use
$('img').visibility({ type: 'image'})
will no longer animate a second time if re-initialized.
- Visibility - Added
onFixed
andonUnfixed
callbacks for visibilitytype: 'fixed'
- Visibility - Added
onLoad
andonAllLoaded
callback fortype: 'image'
visibility - Visibility - Added
zIndex
setting for specifying zindex withtype: 'fixed'
#3370 - Image -
transition hidden image
now shows correctly asvisibility: hidden;
and notdisplay: none
. This will allowoffset
withvisibility
andsticky
to work more seamlessly.hidden image
will still remaindisplay: none;
- Sticky/Visibility - Added mutation observer to teardown element with
destroy
if removed from DOM context, fixing a possible memory leak - Rating - Fixed
ui rating
to not used outlined star in basic variation, instead using a lighter filled in star for increased visibility #3730 - Visibility - Using
type: fixed
will now correctly remove all special classes and placeholder content ondestroy
#3548
- Visibility -
refreshOnResize
now correctly includes a default value #2615
- Dropdown - Dropdown icon will now always toggle menu visibility #2510
- Visibility - Using
.visibility({ type: 'fixed'})
will now automatically add a placeholder element which will swap places with an element when it is attached to the viewport. This should make fixed content drastically simpler. - Visibility - Visibility and sticky now use a more performant pub/sub pattern that will only attach a single event to context
scroll
. - Visibility - Added two new visibility callbacks
onOnScreen
andonOffScreen
, which occur, most obviously when an element first appears in or out of a browser's viewport. - Transition - Transition will no longer force visible/hidden with inline styles if
onComplete
callback sets visibility. - Visibility/Sticky - Visibility and sticky now refresh automatically after page content loading to deal with changes in position from images loading
- Visibility/Sticky - Visibility now uses pub/sub pattern to greatly improve scroll performance when attaching multiple events
- Visibility - Visibility includes a new setting
checkOnRefresh
which determines whether visibility callbacks should occur on resize or refresh - Visibility - Visibility
image
will now wait to lazy load images that are above the current screen position, not just below. - Visibility - In returned
calculations
object,visible
andhidden
are renamed toonScreen
andoffScreen
, since this describes more accurately what the value represents.
- Visibility - Adds updated visibility module from
2.x
channel. Visibility will automatically refresh by default after images load on page refresh. Fixes issues with element positions after image loading. - Visibility - Fixed issue where
precache
behavior was missing from visibility causingimage
lazy loading to fail
- Visibility - Attach callbacks to elements visibility conditions like
top visible
bottom visible
,passing
. Useful for things like: image lazy loading, infinite scroll content, and recording tracking metrics.
See the examples online for a demonstration.
- Transition now has
useFailSafe
parameter (off by default) to ensure transition callback fires even if nativeonAnimationEnd
event does not fire due to element visibility. Chromium Bug Report by Product Manager @ Mozilla and this open issue
- Transition - Transition will now keep block position of elements hidden with visibility hidden
- Transition - onShow and onHide callbacks for visibility changing transitions