EasyUI Forum
April 19, 2024, 09:15:58 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Badge Documentation  (Read 3544 times)
rickmus
Newbie
*
Posts: 8


View Profile Email
« on: April 16, 2018, 09:50:55 AM »

Hello, I am unable to find any documentation on badges.  Specifically how to update and whether or not they will display a zero ( or how to turn on/off in that case ).

Thanks!
Logged
jarry
Administrator
Hero Member
*****
Posts: 2262


View Profile Email
« Reply #1 on: April 16, 2018, 06:40:08 PM »

The Badge is an element with class set to 'm-badge'. A button with a badge is defined as:
Code:
<a id="btn" href="#" class="easyui-linkbutton" style="margin-left:20px">
    Button<span class="m-badge">5</span>
</a>
To update the badge you should update the button's text value.
Code:
$('#btn').linkbutton({
  text: 'Button<span class=m-badge>2</span>'
});
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!