例如,我有两个类 A
和 B
,当我将鼠标悬停在数量、颜色等变化上时,我需要它。 B. 我不需要知道我是否可以使用 CSS 和 onmouseover
来做到这一点。
我正在放置一段代码来处理表的创建和类 C
的定义。
我在这里需要的是,当用户删除或悬停在表格上时激活此类 C
jQuery(grid_selector).jqGrid({
url:urllst,
datatype: 'json',
height: 'auto',,
ignoreCase: true,
colNames:['UF','NAME','CITY' ],
colModel:[
{name:"uf",index:"uf", width:100, sorttype:'text', viewable: true, frozen: true, focus: true,
stype:'text',
formoptions:{elmprefix:'*', label: 'UF:', rowpos:1, colpos:1},
editable:true,
editrules: {required: true},
edittype: 'custom',
classes: 'c',
editoptions: {style: "text-transform: uppercase",
'custom_element' : macro_uf_element,
'custom_value' : macro_uf_value,
},
最佳答案
我相信您需要使用 javascript,但我可能错了。
//grab all of the item images and make sure their popup description shows
var $contentWrapper = $("#contentWrapper");
//and bind the events that allow us to have a popup window follow the cursor
$contentWrapper.on("mouseover", className, function(event) {
var $itemDescription = $(this).parent("").find(".description");
//when the users cursor enters the item ensure that it enables vision of the popup and initialize the coordinates
updatePosition(event.clientX, event.clientY, $itemDescription);
$itemDescription.show();
});
这是我用来在用户将鼠标悬停在图像上时显示 div 的一小段代码,我相信这与您正在寻找的类似。
关于javascript - 如何使悬停效果改变另一个选择的 "object",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24562063/