我有这个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(){alert('Click:: Find');return false}
}, {
path : "/wp-content/themes/Tersus/images/piemenu/vlc.png",
alt : "VLC Media Player",
fn : function(){alert('Click:: Plus');return false}
},{
path : "/wp-content/themes/Tersus/images/piemenu/QuickTime.png",
alt : "Quick Time Player",
fn : function(){alert('Click:: Home');return false}
},{
path : "/wp-content/themes/Tersus/images/piemenu/WMP.png",
alt : "Windows Media Player",
fn : function(){alert('Click:: Music');return false}
},{
path : "/wp-content/themes/Tersus/images/piemenu/popup.png",
alt : "נגן Popup",
fn : function(){alert('Click: E-Mail');return false}
},{
path : "/wp-content/themes/Tersus/images/piemenu/iTunes.png",
alt : "iTunes",
fn : function(){alert('Click: Config');return false}
});
})
</script>
},{
我需要在点击时将图标链接到外部URL,我该如何实现?
我正在写这行,因为它需要更好的代码解释,因为代码很长......(?)
答案 0 :(得分:0)
function(){
window.location.href = 'http://domain.com/';
return false
}