Button.setIsHovered

Syntax

setIsHovered(value);

Parameters

value. If the True value is set to the parameter then the button is displayed in the way it is displayed when the mouse cursor is over it. By default the property is set to False.

Description

The setIsHovered method sets the attribute that the mouse cursor is over the button.

Example

Enable the PP.js libraries and the PP.css visual styles tables in order to execute the example. Create two buttons: an instance of the Button class and the HTML button named setIsHovered. When pressing the last one the setIsHovered method is invoked:

<div id="btn1"></div>

<br/>

<button onclick=  "b1.setIsHovered(true);">setIsHovered</button>

<script type="text/javascript">

    var b1 = new PP.Ui.Button({

    ParentNode: document.getElementById("btn1"),

    Content: Illustrations,

    ImageUrl: "ImgBtn1.png"

})

</script>

After executing the example on pressing the SetIsHovered button the Illustrations button begins to look:

See also:

Button