▼アイコン入りのプルダウンメニューです。メニュー部分をクリックすると、アニメーションしながら開閉します。
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ja" lang="ja"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="Content-Language" content="ja" /> <meta http-equiv="Content-Script-Type" content="text/javascript" /> <meta http-equiv="Content-Style-Type" content="text/css" /> <meta http-equiv="imagetoolbar" content="no" /> <title>Custom Select boxes with jquery | 設置サンプル</title> <link rel="stylesheet" type="text/css" href="/content/lib/global.css" /> <!-- JS --> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script> <script type="text/javascript" src="/content/lib/jquery/jquery.customselect.js"></script> <script type="text/javascript"> $(function(){ $('#customselector').customSelect(); }); </script> <!-- CSS --> <style type="text/css"> img { vertical-align:middle; margin-right:3px; } #iconselect { background:transparent url("/content/img/ajax/select-bg.gif") no-repeat 0 0; width: 250px; height: 25px; padding:4px 0 0 15px; } .selectitems { width:230px; height:25px; border-bottom: dashed 1px #ddd; padding:2px 0 0 10px; } .selectitems span { margin:0 0 0 5px; } #iconselectholder { width: 250px; overflow: auto; display:none; position:absolute; background-color:#fff5ec; } .hoverclass{ background-color:#fff; cursor:hand; } .selectedclass{ background-color:#ffff99; } </style> <link rel="stylesheet" type="text/css" href="/common/css/example.css"></head> <body id='example3' class='example'><div class="ads" style="margin:32px auto;text-align:center;"></div><h1 class='h'><a href='/'>PHP & JavaScript Room</a> :: 設置サンプル</h1> <h3 class='h'>実行結果</h3> <div id="wrap"> <h1><a href='http://www.acewebdesign.com.au/customselect.php'>Custom Select boxes with jquery</a> | 設置サンプル</h1> <p>▼アイコン入りのプルダウンメニューです。メニュー部分をクリックすると、アニメーションしながら開閉します。</p> <!-- CODE --> <select name="select" class="customselect" title="アイコンを選択してください" id="customselector"> <option value="icon1" id="icon1" title="/content/img/icon/color/attention.gif">Attention icon</option> <option value="icon2" id="icon2" title="/content/img/icon/color/star.gif">Star Icon</option> <option value="icon3" id="icon3" title="/content/img/icon/color/rss.gif">RSS Icon</option> </select> <!-- / CODE --> </div> </body> </html>