在FF扩展中使用新的jQuery Position实用程序脚本 [英] Using the new jQuery Position utility script at an FF extension
问题描述
$ $ p $ $('#duck' ).position({
:'#zebra',
my:left top,
at:left top
});
(位置手册位于 http://docs.jquery.com/UI/Position )
我也试过: p>
var doc = gBrowser.selectedBrowser.contentDocument;
$('#duck',doc).position(
:$('#zebra',doc),
my:left top,
at: left top
});
两者都没有成功....另一方面,当我尝试在网上的第一个代码示例页面代码本身,它工作奇妙...
任何人有什么想法是什么原因导致这个问题?
干杯和thx提前!
Nimrod Yonatan Ben-Nes
听起来很有趣,但是在左上角和左上角用双引号, #duck。此外,请确保这一切都被放在$(document).ready函数中。
I'm trying to use the following code at my FF extension with no success:
$('#duck').position({
of: '#zebra',
my: "left top",
at: "left top"
});
(the Position manual is at http://docs.jquery.com/UI/Position)
I also tried:
var doc = gBrowser.selectedBrowser.contentDocument;
$('#duck', doc).position({
of: $('#zebra', doc),
my: "left top",
at: "left top"
});
Both without success.... on the other hand when I try the first code example at the web page code itself it work wonderfully...
Anyone got any idea what's causing the problem?
Cheers and thx in advance! Nimrod Yonatan Ben-Nes
sounds funny, but use double-quotes around the "left top" and "#duck" throughout. Also, be sure this is all been put within the $(document).ready function.
这篇关于在FF扩展中使用新的jQuery Position实用程序脚本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!