我有一个很长的标题,当我没有悬停时,我将它设为省略号...
,然后当我悬停时,长标题将显示全长,从这里我已经使用jquery和css ellipsis
,到目前为止,我有一个问题是当我鼠标移出如何将长标题再次返回ellipsis
时?感谢
答案 0 :(得分:1)
如果你的问题是弹出的标题一旦徘徊就会消失,那么只需先调用渲染功能&然后调用弹出功能。
JSFiddle:http://jsfiddle.net/5qnhcudp/4/
代码:
<script>
var array = [];
$(function() {
array[0] = {
"no": "1",
"name": "fruit",
"value": "mango",
"totalvote": "75"
};
array[1] = {
"no": "2",
"name": "fruit",
"value": "apple",
"totalvote": "10"
};
array[2] = {
"no": "3",
"name": "fruit",
"value": "orange",
"totalvote": "5"
};
array[3] = {
"no": "4",
"name": "fruit",
"value": "banana",
"totalvote": "45"
};
PG.init("popup_survey_whitebox_selection", "1", array);
PG.render_1();
PG.callpopup();
});
</script>