所以我需要像这样使用tiptip (一个tip插件):
$('#my-element').tipTip('show');在我的代码中,我有:
var cells = $('.' + all_cells); //cells refers to all div's with class cells
cells.each(function() {
$(this)
.removeClass('my_links') //fine
.append('<div class="temp"></div>') //fine
.tipTip({ edgeOffset: 10, delay: 0, fadeIn: 0 }); //fine
.tipTip('show') //syntax error我猜这是因为cells不是一个元素,而是一个对象。
类似地,
$('.' + all_cells)
.attr('title', 'something'))
.tipTip({ edgeOffset: 10, delay: 0, fadeIn: 100, fadeOut: 100, maxWidth: "300px" });
.tipTip('show') //syntax error如何在这些循环中使用tipTip(‘show’)?
发布于 2012-12-09 00:30:52
你有一个语法错误:
... ;
.tiptip(...删除最后一行之前的;。
https://stackoverflow.com/questions/13779382
复制相似问题