English 中文(简体)
堆肥器返回堆积层?
原标题:Mootools return to top of containing div?

我使用一种以摩托车为基础的假肢,可以做罚款。 然而,在用户点击新网页(从点击线的底线)之后,我要把新的一套评论和滚动回到集装箱四顶。

是否有这样的功能?

这里需要修改的法典是:

var Comments = new Class({

id: 0,
page: 0,
object: null,
name: null,
parentid: 0,
folder:  ./ ,

initialize: function(id, object, name, folder){
    // Setup
    this.id = id;
    this.object = object;
    this.name = name;
    this.folder = folder;
    // Get the comments for this page
    this.getComments(this.page);
},


cacheDefeat: function() {
    var myDate = new Date();
    return  &r=  + myDate.getTime();
},


getComments: function(page) {
    this.page = page;
    var object = this.object;
    var req = new Request({
        method:  get ,
        url: this.folder +  backend.php ,
        onSuccess: function(text, xml) {
            object.set( html , text);
        }
    }).send( objid=  + this.name +  &do=read&thumbs=  + $(this.name + "sel").value +  &id=  + this.id +  &page=  + this.page + this.cacheDefeat());
},
});

我可以举出正确的办法,把滚动活动添加到一起。

问题回答

你们需要的是Fx.Scroll,这是一个Mootools More Expansion。

您可能希望把你可以访问的窗口带上window。 你们想把窗户中的一些儿童部分开学。 很感激的是,Fx.Scroll有我们这样做的辅助方法。 因此,你可以做以下工作:

var container = $( idOfDivWithPaginatedContents );

var scoller = new Fx.Scroll(window);

确保上述守则不在你希望上页的职能范围内,否则你将产生滚动器的负荷,而不只是一个。 然后,在该职能范围内(确保你作为参数通过滚动器和集装箱):

var paginationFunction = function(scroller, container) {
    //Paginate stuff here

    scroller.toElement(container);
}




相关问题
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.

热门标签