English 中文(简体)
基本接线功能 j Query plugin
原标题:basic api call function w/ jQuery plugin

I m 利用P PrettyPhoto j Query plugin for a pornography gallery,而且我要用以下功能发出带有基本文字链接的APIC,以在系列中反映下一个形象:

$.prettyPhoto.changePage( next );

自2006年以来 在整个现场,我经常发出这一呼吁,因此,我想创设一个基本的 Java字功能,为每个浮标的病例,我只能写上“立克”的字句,而不是打上整件,即“Click=”的字面,“前线”;“每次”。 我试图写一下以下职务,但看来没有做:

$(document).ready(function(){
    function next() {
        $.prettyPhoto.changePage( next );
    };
});

What am I doing wrong here? I m obviously a novice at JS programming, but any direction here would be most appreciated; and please let me know if I should provide any more information.

最佳回答

没有必要在已编写的文件中总结你的职能。 除此之外,你还将在全球空间发挥下一个职能,这是你应努力避免的。 你可以做这样的事情:

$.nextPhoto = function() { $.prettyPhoto.changePage( next );}

and call it with

$.nextPhoto();

将其置于格列斯名称空间,但更好的办法是使用舱单处理器.click(,并对端对等 照片直接与链接,而不是在网上使用javascript

问题回答

暂无回答




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

热门标签