D3 Zoom Settings

I am having some trouble understanding how zoom work in D3, specifically how it is called and the settings initialized. I have the following snippet of code (only the essential bits are included), …

D3.js – selection knowing part of an attribute

I have to select SVG elements with a specific transform attribute, knowing just a part of it. Let me better explain with an example. These are the elements I’d like to select: (function ($) { $('.afc_close_content').click(function(){ var afc_content_id = $(this).closest('div').attr('id'); $('#'+afc_content_id).hide(); }); })(jQuery);