I'm a bit like you in that specifying HTML feels a bit funny. I always
preferred to add attributes, etc. to an object(though it could be
quite tedious before jQuery). Anyway, one still needs to specify some
HTML but this is a bit better:

$('<a />')
        .attr('href', '#')
        .attr('id', 'myytplayerControlsMute')
        .css('margin', '5px')
        .text('Mute')
        .click(function() { e.preventDefault(); })
        .appendTo('body');

Reply via email to