[wp-hackers] Bind events and get the current model in new Media manager
Alfredo Sumaran
a.sumaran at gmail.com
Fri Jan 4 15:10:37 UTC 2013
Hello there.
I'm trying to see which is the best way to add a link in the sidebar
of the new media manager using javascript.
I tried to add the link using the jQuery plugin livequery with
something like that
$('.attachment-details').livequery(function(){
$('.attachment-details').append('<label> </label><a href="#"
class="set_tag">Set tags for this photo</a>');
});
but the problem is that I can't determine which thumb is selected
because there's no ID as identifier, so I can't build the correct link
that I need. a sort of fancybox window that requires the selected
thumbnail/attachment ID
so, how I can get the event that fires when de the sidebar is opened
and the Backbone model of the current thumbnail?
Thanks in advance
More information about the wp-hackers
mailing list