Forums
Change of color while hovering - Printable Version

+- Forums (https://bdn.bdb.ai)
+-- Forum: BDB Knowledge Base (https://bdn.bdb.ai/forumdisplay.php?fid=13)
+--- Forum: BDB Dashboards Designer (https://bdn.bdb.ai/forumdisplay.php?fid=43)
+---- Forum: BDB Designer Q & A (https://bdn.bdb.ai/forumdisplay.php?fid=16)
+---- Thread: Change of color while hovering (/showthread.php?tid=395)



Change of color while hovering - rubeena.hajira - 12-22-2022

Script to change color while hovering (moving cursor)on the component:
* This should be written in the component script.

var p=sdk.getContext( 'applyfiltercolor' );
if(p==0)
{
}
else
{
sdk.setContext( 'applyfiltercolor',0);

var xx=sdk.getWidget( 'label1' );
xx.m_cursortype="default";
xx.draw();

var b = sdk.getDivIdFromComponetId( 'label1' );
sdk.applyStyle('#'+b+' span',"background-color", "rgba(254,0,34,0.7)");
$('#Target_filter_search01').css("background-color","#f2f0f0");
}