首页 > 其他 > 详细

easyui-tabs图标(获取焦点时显示图标,失去焦点时隐藏图标)

时间:2015-07-06 23:20:01      阅读:197      评论:0      收藏:0      [点我收藏+]

获取焦点时显示图标,失去焦点时隐藏图标

技术分享
    
    <script type="text/javascript">

        $(#_progress).tabs({
            onSelect: function (title) {
                var tab = $(#_progress).tabs(getSelected);  // get selected panel

                var index = $(#_progress).tabs(getTabIndex, tab);
                //alert(index + title);
                var tabs = $(#_progress).tabs().tabs(tabs);
                for (var i = 0; i < tabs.length; i++) {
                    if (index == i) {
                        //alert(i);
                        $(#_progress).tabs(update, {
                            tab: tabs[i],
                            options: {
                                title: <img src=\‘images/accordion_arrows.png\‘/> + title
                                //href: ‘get_content.php‘  // the new content URL
                            }
                        });
                    }
                    else {
                        if (i == 0) {
                            $(#_progress).tabs(update, {
                                tab: tabs[i],
                                options: {
                                    title: 柱状图
                                    //href: ‘get_content.php‘  // the new content URL
                                }
                            });
                        }
                        else {
                            $(#_progress).tabs(update, {
                                tab: tabs[i],
                                options: {
                                    title: 曲线图
                                    //href: ‘get_content.php‘  // the new content URL
                                }
                            });
                        }
                    }
                }

            }
        });

        $(function () {
            var tabs = $(#_progress).tabs().tabs(tabs);
            for (var i = 0; i < tabs.length; i++) {
                tabs[i].panel(options).tab.unbind().bind(mouseenter, { index: i }, function (e) {
                    $(#_progress).tabs(select, e.data.index);
                });
            }
        });

    </script>
View Code

 

easyui-tabs图标(获取焦点时显示图标,失去焦点时隐藏图标)

原文:http://www.cnblogs.com/shenchao/p/4625545.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!