2010-11-28 117 views
0

http://jqueryui.com/demos/autocomplete/#combobox這是什麼JQuery腳本?

在右手邊,有選擇的選項卡(帶有指向左邊的箭頭選擇)

什麼CSS菜單這是什麼?爲什麼我無法在JQuery UI網站上找到它?

+0

這只是普通的HTML + CSS。不需要JavaScript/jquery。查看源代碼,和/或使用瀏覽器的dom檢查器。左指箭頭只是一個背景圖片,由css`a:hover`規則應用。 – Lee 2010-11-28 04:30:25

回答

0

這不是一個插件,它是一個簡單的html/css/javascript位在頁面上。

控制菜單的javascript在http://jqueryui.com/js/demos.js

的特定部分:

//Rewrite and prepare links of right-hand sub navigation 
    $('#demo-config-menu a').each(function() { 
     $(this).attr('target', 'demo-frame'); 
     $(this).click(function(e) { 

      resetDemos(); 
      $(this).parents('ul').find('li').removeClass('demo-config-on'); 
      $(this).parent().addClass('demo-config-on'); 

      //Set the hash to the actual page without ".html" 
      window.location.hash = this.getAttribute('href').match((/\/([^\/\\]+)\.html/))[1]; 

      loadDemo(this.getAttribute('href')); 
      e.preventDefault(); 

     }); 
    });