Add the most natural sound on earth to your pages

Basics

Initiate the fart player:

fart = new Fart();

You can set the default sound when initiating the fart script:

fart = new Fart({

default_sound: farts.toot,

loop: true,

volume: 100

});

To play a default sound, use this syntax:

fart.play();



To play a particular sound, use this syntax:

fart.play([sound]);

Examples:

fart.play(farts.toot);



fart.play('tuppence');



Options

default_sound

You can set the default sound when initiating the fart script. This is the sound that plays when you just call fart.play();

{default_sound: farts.raspberry}

Possible values: Default: raspberry You can set the default sound when initiating the fart script. This is the sound that plays when you just call fart.play();Possible values:Default: raspberry

loop

You can set the fart to play once or loop forever

{loop: false}

Possible values: true, false

Default: false