我正在使用jquery-1.10.1.min.js
我正在尝试滚动光标更改(从指针到抓取)和为无线电图像选择的边框颜色。这是该地区的jquery:
<script>
$(document).ready(function(){
$("#Grid").hover(function(){
$(this).css("cursor", "grab");
}, function(){
$(this).css("cursor", "pointer");
});
});
$(document).ready(function(){
$("#List").hover(function(){
$(this).css("cursor", "grab");
}, function(){
$(this).css("cursor", "pointer");
});
});
</script>
我的HTML是:
<div>
<form>
<span style="float:right; margin:-10px 100px 0px 20px;">Change view: </span>
<span style="float:right; margin:-10px -200px 0px 0px;">
<input class="listing" id="List" style="visibility: hidden;" name="listing" onclick="hideForm()" type="radio">
<label class="listing" for="List">
<img src="/devsite/images/icons/row.png" alt="List" title=" List " border="0"></label>
<input class="listing" id="Grid" style="visibility: hidden;" name="listing" onclick="hideForm()" type="radio">
<label class="listing" for="Grid">
<img src="/devsite/images/icons/table.png" alt="Grid" title=" Grid " border="0"> </label>
</span>
</form>
</div>
css很简单:
.listing img:hover {
cursor:grab;
border: 4px dashed #bbc3d3;
}
隐藏表单基本上显示产品的网格或列表视图。 hideform工作正常,我无法让光标更改或选定的无线电有边框...
任何帮助都将非常感谢....