/    Sign up×
Community /Pin to ProfileBookmark

Question from a tutorial by a n00b (me)

Hi I don’t normally do javascripting but my friend who usually does this is away on vacation, so this may be really simple.

I applied the following tutorial on pagination to a web page, if you go to the link there is a demo, and you can download the final files from there as well, its actually pretty cool: [URL=”http://tutorialzine.com/2010/05/sweet-pages-a-jquery-pagination-solution/”]http://tutorialzine.com/2010/05/sweet-pages-a-jquery-pagination-solution/[/URL]

My problem is that it auto generates those links on the bottom of the demo. I don’t want to use those links though, i want to use image links that i create. The author of that tutorial (while answering someone else’s question) gives the code here to go to an “about” page, page 4 counting from 0 from a link:

[CODE]$(‘#goToAboutPage’).click(function(e){ // This is your navigation link

// Emulate a click on the fourth control link –
// the slide your about page is located on (counted from zero):

$(‘a.swShowPage’).eq(3).click();

e.preventDefault();
});[/CODE]

however i dont know how apply that on the web page to make the href link work for an image file. any suggestions would be greatly appreciated.

to post a comment
JavaScript

1 Comments(s)

Copy linkTweet thisAlerts:
@KorOct 22.2010 — Your problem is that, as a noob, you have slipped into something which might be beyond you. The code above tell us that you are using a JavaScript library (probably JQuery, but one can never be sure without a confirmation). [I]That is not a native JavaScript code[/I], so that, unless someone has working a long time with, it is not easy to debug/modify.

If you don't know even that difference, it is better to give up and wait for the end of your friends vacancy. It's like trying to translate something from a dialect of a language [I]without knowing the language itself[/I].
×

Success!

Help @DeLiRiOuS spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...