-
Notifications
You must be signed in to change notification settings - Fork 0
pageController Objects
Arshia edited this page Aug 6, 2021
·
3 revisions
pageController Is An Object To Control The Page. It's Useful Sometime !
Way To Use :
var page = new pageController();
page.[function]();
Functions And Methods Are Here :
Set Page Opacity To Something. Its Useful For Creating A Menu !
changeElementOpacity( id [ id Of The HTML Element ] , percent [ How Many Percent You Wanted To Set Opacity ? ] )
Set Opacity Of An Element Of Page.
changeElementsOpacity( name [ name Of Elements ] , percent [ How Many Percent You Wanted To Set Opacity ? ] )
Set Opacity To Some Elements Of The Page.
Get Middle Of The Page ( X )
Get Middle Of The Page ( Y )
You Can Access To The Page Width Like That :
[object].pageWidth
And You Can Access To The Page Height Like That :
[object].pageHeight
Example :
var page = new pageController();
page.changeOpacity(20);
function change(){
if(page.getOpacity() != 100){
page.changeOpacity(page.getOpacity() + 1);
}
else{
clearInterval(ival);
}
}
var ival = setInterval(change,10);