Adding an icon to a jazz.ui.Button button.
I would like to add a small icon inside of a button that I have created using jazz.ui.Button. Is there built-in functionality to accomplish this, or do I have to use an html anchor tag somewhere?
Thanks! |
One answer
The constructor for Button takes an imageClass param. Pass it, and also set a className on your button (to narrow the scope of your CSS).
Example: var button = new jazz.ui.Button({imageClass: "someClass"}); dojo.addClass(button.domNode, "MyButton"); Then in CSS: .Mybutton .someClass { background-image:url(someImage.gif); width:80px; //tweak this width depending on your image } |
Your answer
Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.