Closed shaunmorrison closed 10 years ago
Haven't forgotten about this. I've been thinking about splitting out a max-width
version into a plugin, since the original intent was to keep this mobile first. Will give more thought and comment later.
Think I'm going to keep this as mobile-first for now. May circle back at a later version, but happy with the implementation as of now.
Now you can specify to load commented content if current screen size is either smaller OR larger than the specified breakpoints. Previously, commented content could only be loaded in if larger than a specified breakpoint.
This is done with the data attribute names in triggerMin (data-usn-load-if-larger) & triggerMax (data-usn-load-if-smaller).
This would load if larger than the specified breakpoint:
This would load if smaller than the specified breakpoint:
I know the original Responsive Comments JS was created to be 'progressive enhancement only', but often IMHO there is a good reason to load in different content & media on smaller devices.