I have added a custom button to the media actions in a custom theme,
function wp_myplugin_media_button($context) {
$wp_myplugin_media_button_image = '../wp-content/themes/datamine/images/icon_create_table.gif';
$wp_myplugin_media_button = ' %s' . '<a id="fluffyRabbit" href="javascript:;" title="Add a Tabletool table to the post."> <img src="'.$wp_myplugin_media_button_image.'" alt="" /></a>'; // table.php?type=tabletool&TB_iframe=true" class="thickbox"
return sprintf($context, $wp_myplugin_media_button);
}
add_filter('media_buttons_context', 'wp_myplugin_media_button');
but how can I attach event listeners?
$('#fluffyRabbit').live('click',function() { alert('o hai!'); });
If I use add_action, do I have to include a new script.js file?
If someone can step by step me on this that would be awesome. I just started really tinkering with WP.
Cheers! Bo