You can add a data attribute and value to a WordPress gallery via jQuery
jQuery(document).ready(function($){ $('#gallery-1 a').each(function() { $(this).attr('data-gall', 'gallery-mine' ); }); });
So above we are targetting the a link tags that are the descendants of the gallery with an id of #gallery-1
They are then given a data attribute of data-gall and a value of gallery-mine.