i got a css rule like this:
#imgwrapper {display: block;position: relative;width:auto;height:auto;}
我有一个超链接,当它被点击时,应该像这样为#imgwrapper添加CSS规则:
#imgtarget, #imgwrapper img {cursor:crosshair;}
我该怎么做?
我尝试了jQuery的.css() API,但它没有起作用。
See the $.css() function
$('a.whatever').click(function() {
$('#imgtarget').css('cursor' , 'crosshair');
$('#imgwrapper img').css('cursor', 'crosshair');
});
$('#imgwrapper').css('cursor','crosshair')
.css()
的代码? - icktoofay