PHP & JavaScript Room :: 設置サンプル

実行結果

jQuery Custom Check Box and Radio Buttons | 設置サンプル

▼チェックボックスとラジオボタンを画像化

チェックボックス    
ラジオボタン    

設置サンプルのソース

<!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>jQuery Custom Check Box and Radio Buttons | 設置サンプル</title>
      <link rel="stylesheet" href="/content/lib/global.css" type="text/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/cust_radio_buttons/cust_checkbox_plugin.js"></script>
      <script type="text/javascript">
         $(function() {
            $("input[type='checkbox']").custCheckBox();
            $("input[type='radio']").custCheckBox();
         });
      </script>
      <!-- CSS -->
      <style type="text/css">
         .cust_checkbox { font-size:14px; cursor:pointer; }
         .cust_checkbox_on { background:url("/content/lib/jquery/cust_radio_buttons/checkbox_on.png") no-repeat left center; }
         .cust_radio_on { background:url("/content/lib/jquery/cust_radio_buttons/radiobox_on.png") no-repeat left center; }
         .cust_checkbox_off { background:url("/content/lib/jquery/cust_radio_buttons/checkbox_off.png") no-repeat left center; }
         .cust_radio_off { background:url("/content/lib/jquery/cust_radio_buttons/checkbox_off.png") no-repeat left center; }
         .cust_checkbox_disabled_on { background:url("/content/lib/jquery/cust_radio_buttons/checkbox_disabled_on.png") no-repeat left center; }
         .cust_checkbox_disabled_off { background:url("/content/lib/jquery/cust_radio_buttons/disabled_off.png") no-repeat left center; }
         .cust_radio_disabled_on { background:url("/content/lib/jquery/cust_radio_buttons/radiobox_disabled_on.png") no-repeat left center; }
         .cust_radio_disabled_off { background:url("/content/lib/jquery/cust_radio_buttons/disabled_off.png") no-repeat left center; }
         fieldset { margin:0 0 20px 0; padding:10px; }
      </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 &amp; JavaScript Room</a> :: 設置サンプル</h1>
<h3 class='h'>実行結果</h3>
      <div id="wrap">
         <h1><a href='http://mypocket-technologies.com/jquery/cust_radio_buttons/'>jQuery Custom Check Box and Radio Buttons</a> | 設置サンプル</h1>
         <p>▼チェックボックスとラジオボタンを画像化</p>
<!-- CODE -->
      <fieldset>
         <legend>チェックボックス</legend>
         <label for="c1">ラベル1</label>
         <input type="checkbox" value="1" name="checkboxone" id="c1" checked="checked"/> 
         <label for="c1">ラベル2</label>
         <input type="checkbox" value="2" name="checkboxone" id="c2"/> 
         <label for="c1">ラベル3</label>
         <input type="checkbox" value="3" name="checkboxone" id="c3" checked="checked"/>
      </fieldset>
      <fieldset>
         <legend>ラジオボタン</legend>
         <label for="r1">ラベル1</label> 
         <input type="radio" value="1" name="radionone" id="r1"/> 
         <label for="r2">ラベル2</label> 
         <input type="radio" value="2" name="radionone" id="r2" checked="checked"/> 
         <label for="r3">ラベル3</label> 
         <input type="radio" value="3" name="radionone" id="r3"/>
      </fieldset>
<!-- CODE / -->
      </div>
   </body>
</html>