2012-07-30 106 views
1

我有這樣的jQuery的菜單腳本:鏈接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

我們可以看到完整的代碼(也許甚至一的jsfiddle?) – SomeKittens 2012-07-30 12:55:16

+0

是ofcourse..ill編輯在一秒 – Trance84 2012-07-30 12:59:08

回答

0
function(){  
    window.location.href = 'http://domain.com/'; 
    return false 
} 
+0

Thanx的try..it不會去url.just這個 - > http://i48.tinypic.com/dvooyg.png – Trance84 2012-07-30 13:08:55

+0

刪除警報,看看會發生什麼 – Dipak 2012-07-30 13:10:24

+0

Yupp。 。試試吧。 – Trance84 2012-07-30 13:11:37