EasyUI Forum
May 10, 2024, 09:16:15 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Tool-tipping for menu  (Read 3406 times)
WizPS
Jr. Member
**
Posts: 67


View Profile
« on: July 06, 2019, 08:11:16 AM »

I use a ribon menu and would like to dynamic add tool-tipping, how can I?

Here is my code example:
Code:
<div id="rr" style="width: 700px;"></div>
<script>

$(function () {
var data = {
tabs: [{
title: 'Home'
, tooltip: 'Welcome to the home menu'
, groups: [{
title: 'Clipboard'
, tools: [{
type: 'toolbar'
, tools: [{
name: 'paste'
, tooltip: 'Paste stuff'
, text: 'Paste'
, iconCls: 'icon-paste-large'
, iconAlign: 'top'
, size: 'large'
}]
}, {
type: 'toolbar'
, dir: 'v'
, tools: [{
name: 'cut'
, tooltip: 'Cut stuff'
, text: 'Cut'
, iconCls: 'icon-cut'
, iconAlign: 'left'
, size: 'small'
}, {
name: 'copy'
, tooltip: 'Copy stuff'
, text: 'Copy'
, iconCls: 'icon-copy'
, iconAlign: 'left'
, size: 'small'
}, {
name: 'format'
, tooltip: 'Format stuff'
, text: 'Format'
, iconCls: 'icon-format'
, iconAlign: 'left'
, size: 'small'
}]
}]
}, {
title: 'other title'
, tools: [{
type: 'toolbar'
, tools: [{
width: '200px'
}]
}]
}]
}]
}


$('#rr').ribbon({
data: data
});
});
</script>
Logged
jarry
Administrator
Hero Member
*****
Posts: 2264


View Profile Email
« Reply #1 on: July 08, 2019, 08:06:10 AM »

Try to use this code.
Code:
, tools: [{
name: 'paste'
, text: '<span title="Paste stuff">Paste</span>'
, iconCls: 'icon-paste-large'
, iconAlign: 'top'
, size: 'large'
}]
Logged
WizPS
Jr. Member
**
Posts: 67


View Profile
« Reply #2 on: July 09, 2019, 02:18:45 AM »

Hi Jarry,
I know this solution but want to add this dynamically to whole menu. I added the attribute "tooltip" containing the text to populate. Is there a way to loop the menu recursively and add an easyui-tooltip to each the button?
Logged
jarry
Administrator
Hero Member
*****
Posts: 2264


View Profile Email
« Reply #3 on: July 09, 2019, 07:28:03 PM »

The 'tooltip' property is available now. Please try to download the newest file 'jquery.ribbon.js' from https://www.jeasyui.com/extension/ribbon.php
Logged
WizPS
Jr. Member
**
Posts: 67


View Profile
« Reply #4 on: July 16, 2019, 11:07:46 AM »

Hi, Tool-tipping works fine now, thanks a lot! BR
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!