在Firefox中運行良好,但在ie中沒有任何作用。任何人都可以給我如何得到這個工作在ie的建議嗎?
<script type="text/javascript">
$(document).ready(function(){
var links = $('.bound');
var west = $('.west');
var west2 = $('.west2');
var west3 = $('.west3');
var west4 = $('.west4');
west2.hide();
west3.hide();
west4.hide();
links.click(function(event){
west.hide();
west2.hide();
west3.hide();
west4.hide();
west.filter('.' + event.target.id).show();
west2.filter('.' + event.target.id).show();
west3.filter('.' + event.target.id).show();
west4.filter('.' + event.target.id).show();
});
});
</script>
HTML
<div class="tabset">
<div id="tab1" class="tab-box">
<div class="form-holder">
<form action="#">
<fieldset>
<label for="lb02"><strong>Choose District:</strong></label>
<select id="lb02">
<option class="bound" id="west">WEST</option>
<option class="bound" id="west2">WEST2</option>
<option class="bound" id="west3">WEST3</option>
<option class="bound" id="west4">WEST4</option>
</select>
</fieldset>
</form>
</div>
<div class="report-box">
<table>
<thead>
<tr>
<td class="name">Name</td>
<td class="department">Department</td>
<td class="title">Title</td>
<td class="district">District</td>
<td class="profile"> </td>
</tr>
</thead>
<tbody>
<tr class="west">
<td>Name1</td>
<td>Dept2</td>
<td>Title2</td>
<td>West</td>
<td><a class="btn-profile" href="#">PROFILE</a></td>
</tr>
<tr class="west2">
<td>Name2</td>
<td>Dept2</td>
<td>Title2</td>
<td>West2</td>
<td><a class="btn-profile" href="#">PROFILE</a></td>
</tr>
</tbody>
</table>
</div>
</div>
會發生什麼情況?什麼不行?你會得到什麼錯誤? – 2011-04-14 23:13:27
http://jsfiddle.net/ap2nC/(OP的代碼,在行動中) – hookedonwinter 2011-04-14 23:15:37