@boikom
@boikom
Forum Replies Created
-
AuthorPosts
-
admin
KeymasterHi Christopher,
Thank you for this example. I will use this native way.
–Aleksandar Laskinadmin
KeymasterHi Aleksandar,
If you want to change button’s background color and color, please, set the following CSS variables:--smart-background-color: #55719e; --smart-color: white;
More information about button’s CSS styling can be found here:
https://www.htmlelements.com/docs/button-css/
Best Regards,
Ivailo
SmartElements Team
http://www.htmlelements.comadmin
KeymasterHi Aleksandar,
Here is how to set the dataSource property as an attribute:
<smart-list-box data-source='["Order 1", "Order 4"]'></smart-list-box>
Note that when setting properties as attributes, they have to be in dash-case (not in CamelCase), i.e. data-source, not dataSource.
Best Regards,
Dimitar
SmartElements Team
http://www.htmlelements.comadmin
KeymasterHi pcng618,
In order to change the content of the Tooltip dynamically you need to set the innerHTML property of the Tooltip instance. To change it when clicking on a button you have to bind to it’s click event and simply set the new content to the innerHTML property of the Tooltip. Here’s an example:<head> <script> window.onload = function () { var tooltip = document.querySelector('smart-tooltip'); document.getElementById('myButton').addEventListener('click', function (event) { document.getElementById('tooltip').innerHTML = 'The button is clicked !'; }) } </script> </head> <body> <smart-button id="myButton"></smart-button> <smart-tooltip id="tooltip" selector="myButton">Some Random Text</smart-tooltip> </body>
Best Regards,
Christopher
SmartElements Team
http://www.htmlelements.com -
AuthorPosts