I’m stuck in searching a way to access the quicktag buttons on the html editor with jQuery. I tryed to access the buttons with .each()
and .children()
but both won’t work.
jQuery( document ).ready( function( $ ) {
$( '#ed_toolbar input.ed_button' ).children().css( 'color', 'red' );
$( '#ed_toolbar input.ed_button' ).each( function() {
$( this ).css( 'color', 'red' );
});
});
I think the buttons are not inserted when the DOM is ready.
I wrote a jQuery plugin to check every 0.5 seconds if the toolbar has the requested element.
And a simple example how to use it
Maybe the plugin need some improvements, but it could be usefull in other situations too.