0

我有一个看起来像这样的 jQuery 菜单插件

<script type="text/javascript">
            jQuery(document).ready(function(){


                jQuery('#promo').pieMenu({icon : [
                        { 
                            path : "/wp-content/themes/Tersus/images/piemenu/winamp.png",
                            alt  : "Winamp",
                            fn   : function(){('Click:: Plus');window.location.href = 'http://94.23.250.14:2199/tunein/tranceilfm.pls';return false}
                        },  { 
                            path : "/wp-content/themes/Tersus/images/piemenu/vlc.png",
                            alt  : "VLC Media Player",
                            fn   : function(){('Click:: Plus');window.location.href = 'http://94.23.250.14:2199/tunein/tranceilfm.pls';return false}  
                        },{ 
                            path : "/wp-content/themes/Tersus/images/piemenu/QuickTime.png",
                            alt  : "Quick Time Player",
                            fn   : function(){('Click:: Plus');window.location.href = 'http://94.23.250.14:2199/tunein/tranceilfm.qtl';return false}
                        },{ 
                            path : "/wp-content/themes/Tersus/images/piemenu/WMP.png",
                            alt  : "Windows Media Player",
                            fn   : function(){('Click:: Plus');window.location.href = 'http://94.23.250.14:2199/tunein/tranceilfm.asx';return false}
                        },{ 
                            path : "/wp-content/themes/Tersus/images/piemenu/popup.png",
                            alt  : "נגן Popup",
                            fn   : function(){('Click:: Plus');window.location.href = 'http://www.tranceil.fm/wp-content/plugins/fullwidth-audio-player/popup.html';return false}
                        },{ 
                            path : "/wp-content/themes/Tersus/images/piemenu/iTunes.png",
                            alt  : "iTunes",
                            fn   : function(){alert('...בקרוב');return false}
                        }],
                    beforeMenuOpen: function(){
                        jQuery('<div id="shadow"></div>').css(
                        {
                            'position':'fixed',
                            'background-color':'#000000',
                            'opacity': 0.6,
                            'width':'100%',
                            'height':'100%',
                            'z-index' :999,
                            'top':0,
                            'left':0
                        }).appendTo('body');
                    },
                    beforeMenuClose: function(){
                        jQuery('#shadow').remove();
                    }
                });
            });

        </script> 

如何将标题中的 div 插入其中一个图标?我想要一个图标来调用那个 div(它是一个音频播放器按钮,可以打开一个带有播放器的弹出窗口)

<div class="fap-track-buttons"><a href="http://94.23.250.14:8000/live" title="TranceIL.FM" rel="http://www.tranceil.fm/wp-content/uploads/2012/05/logo-tranceil-1024x5761.png" target="" data-meta="#fap-meta-3227" class="fap-play-button fap-single-track">Play</a>
                </div>

您可以查看http://www.tranceil.fm/,然后按中间的“播放”按钮进行查看。

有什么想法吗?

4

1 回答 1

1

根据您的data-meta元属性的作用,您可能可以将其添加到菜单中:

,{ 
  path : "/wp-content/uploads/2012/05/logo-tranceil-1024x5761.png",
  alt  : "Play",
  fn   : function(){window.location.href = 'http://94.23.250.14:8000/live';return false}

如果没有,你绝对可以这样做:

,{ 
  path : "/wp-content/uploads/2012/05/logo-tranceil-1024x5761.png",
  alt  : "Play",
  fn   : function(){$("#yourID").click();return false}

然后你只需要添加id= "yourID"到播放按钮(不是div,<a>元素)

于 2012-08-01T23:17:15.593 回答