English 中文(简体)
如何利用JQuery确定这一估算?
原标题:How to fix this animation using JQuery?

我正在利用JQuery制作一个读书。 当有人在 but子上点击时,便看上去。 这实际上是一种隐蔽的 d。 我的问题是,当我点击 but子时,我想把四点从 but子上来,当我点击时,它会回到同一个 but子上来,而我所看到的结果是,当我点击 but子时,就从 but子上去了,而当我点击时,它横跨到我点首的更纽子。 请帮助我确定这一点。 我猜测,我的法典有一小 gl。 http://jsfiddle.net/shivkumarganesh/qLEbD/“rel=“nofollow”http://jsfiddle.net/shivkumarganesh/qLEbD/

最佳回答

http://jsfiddle.net/6uLF7/“rel=“nofollow” http://jsfiddle.net/6uLF7/

问题在于储存所剩目标的各种变量的局部范围,以及顶层抵消。

http://www.ohchr.org。

增加2项声明:

var readMoreInfoTop = 0;
var readMoreInfoLeft = 0;

Removed var keyword from the top and left assignments inside the click handler

readMoreInfoTop = readMoreOffset.top + 10;
readMoreInfoLeft = readMoreOffset.left + 10;
问题回答

每当你打开一个顿子时,你们都会在靠近的纽顿上增加另一个听众。 您可在重新约束闭门听众之前将其编成册:。 http://jsfiddle.net/qLEbD/54/

......

紧靠旁边的听众一次(除纽顿点功能外)把左边的位置储存在纽顿点。

//doc ready...
function() {

  var leftPosition;

  $( .button ).click(function() {
    //animate popup to open
    leftPosition = $(this).offset.left;
  });

  $( #close ).click(function() {
    //animate popup to close using leftPosition
  });
}();




相关问题
selected text in iframe

How to get a selected text inside a iframe. I my page i m having a iframe which is editable true. So how can i get the selected text in that iframe.

How to fire event handlers on the link using javascript

I would like to click a link in my page using javascript. I would like to Fire event handlers on the link without navigating. How can this be done? This has to work both in firefox and Internet ...

How to Add script codes before the </body> tag ASP.NET

Heres the problem, In Masterpage, the google analytics code were pasted before the end of body tag. In ASPX page, I need to generate a script (google addItem tracker) using codebehind ClientScript ...

Clipboard access using Javascript - sans Flash?

Is there a reliable way to access the client machine s clipboard using Javascript? I continue to run into permissions issues when attempting to do this. How does Google Docs do this? Do they use ...

javascript debugging question

I have a large javascript which I didn t write but I need to use it and I m slowely going trough it trying to figure out what does it do and how, I m using alert to print out what it does but now I ...

Parsing date like twitter

I ve made a little forum and I want parse the date on newest posts like twitter, you know "posted 40 minutes ago ","posted 1 hour ago"... What s the best way ? Thanx.

热门标签