wimpy.getButtonBy

 

Grabs the object that contains information about each button. These objecst are used internally by Wimpy and contain the following properties:

  • id
  • element
  • file
  • textPlay
  • textPause
  • textLoading
  • playing

 

wimpy.getButtonBy(key, value)

 

Parameters

key string

The field name to perform the lookup against.

 

value string

The value related to the key for a specific button.

 

 

Return Value

object

A handle to a Wimpy Button Object.

 

See Also

 

Examples

============ UNTESTED CODE ===========
<p data-wimpybutton="foo.mp3">Play Foo.</p>

<script>
function doSomething(){
	var myButton = wimpy.getButtonBy("file", "foo.mp3");

	var see = "";
	for(var prop in myButton){
		see += prop + " : " + myButton[prop].toString() + "\n";
	}

	alert(see);

} wimpy.onReady(doSomething); </script>