Hi Mitchell,

<a class="sound_event" ref="../sounds/sound1.mp3">link1</a>
<a class="sound_event" ref="../sounds/sound2.mp3">link2</a>
<input type="checkbox" id="sound_switch" value="turn on/off"/>

$(document).ready(function(){
  $(".sound_event").click(function(){
    if ($("#sound_switch").attr("checked")) {
        execEventSound($(this).attr("rel"));
    }
  })
});


i hope this will help, ( the code i have not try yet^_^)

On Aug 7, 11:23 am, "Mitchell Waite" <[EMAIL PROTECTED]> wrote:
> I have a check box that I want to disable the sound in my app when its
> checked and restore sounds when its unchecked.
>
> The sounds in my app are created when the user clicks on a link that has a
> handler like this:
>
> onclick="execEventSound('../sounds/sound1.mp3')"
>
> I was thinking the easy way to disable that would be to insert or append
> something  to it. So my question is
>
> a)      Can you insert or append HTML or text to a "onclick", e.g. how would
> I select it as a target?
>
> b)      What would be the best way to disable this onclick?
>
> Thanks
>
> Mitch

Reply via email to