First off, many thanks for Foundation 3.2! Great work as always, and I'm very appreciative to Zurb for their ongoing contributions to the web development community. :)
I've been playing around with the Clearing plugin (so far just on the Foundation site–haven't yet gotten to upgrade to 3.2 myself) and I have some thoughts/ideas for discussion.
Xto exit Clearing.
captionsare gotten from.
alttag are both very common sources for caption data (in my case I use the
titletag of the
imgthumbnail). Data-attribtues are great and all, but I imagine that many folks might already have the caption data in places like
alt. Maybe the easiest (and most inclusive) thing to do would be to make an option to change which attribute of the
imgtag is used. This would default to
data-captionbut a developer could pass any
imgtag attribute they want (eg,
alt, their own custom
ul > listructure. Ideally it would be great to just be able to pass a jQuery selector to the Clearing plugin (eg,
$('a[href$=".jpg"], a[href$=".png"]')which would select those image links; or alternatively one could assign a classname to the appropriate links and then pass that to Clearing, a la
$('.my-classname')). In looking at the plugin code it seems like making it more versatile could be a bit of work (and I don't want to make assumptions about the direction Zurb wishes to go, so that is why I'm not just submitting a Pull Request) as the plugin seems to pretty heavily assume there will be a
ul > listructure.
previousand the carousel) once you break out of the
ul > listructure. In my case I have instances where images are connected with each other and thus
next/previousmakes sense, but I also have instances where images are standalone and I currently don't have them switch to the next image (and it would probably actually be confusing if it did switch to the next image).
I'm interested to hear what Zurb folks and others think about the above. I'm happy to help however I can but I don't want to do a bunch of work on it if it is not a direction that there is interest in implementing/incorporating, so thus I'm putting this all out here for discussion. :)