1

I am new codder and i need some help.Firstly sorry for my bad english.My main page is a image.I have some brand on this page.For example:

  • a
  • b
  • c

i want to when i click a image go to the page 1 and when i click b image go to the page 2. i need a image map and link like this. Can you send example like this or a little help please ?

Page codes

Firstly sorry for my bad english.My main page is a image.I have some brand on this page.For example:

a b c i want to when i click a image go to the page 1 and when i click b image go to the page 2. i need a image map and link like this. Can you send example like this or a little help please ? İts not a clickable

example html

<li class="i">
                <img onclick="gotopage()" "src="pages/1.jpg" width="76" height="100" class="page-1">
            
                <span>1</span>
            </li>
jss

function gotopage()
{

    $("#flipbook").turn("page", 10);
}
  • Hi - some googling would find many examples like this: https://amylynnandrews.com/html-clickable-image/ <- step 6 (i.e. enclose the tag within a html link ) – PaulG Jul 09 '20 at 10:39
  • Hi.I know how can i link image i try this but never changed in my main page.İts not working – Emre Birinci Jul 09 '20 at 10:47

2 Answers2

0

I think there is a small typo in your code [ extra quote before src ] I have fixed it here: https://jsfiddle.net/tc37uhqa/

JSFiddle (and many other similar services) really help when you want to quickly test something

<li class="i">
                <img onclick="gotopage()" src="https://www.google.co.uk/images/branding/googlelogo/1x/googlelogo_color_272x92dp.png" width="76" height="100" class="page-1">
            
                <span>Click on Google!</span>
            </li>

function gotopage()
{

        alert("OK - Function triggered"); // TO PROVE WE GET HERE...
    $("#flipbook").turn("page", 10);  // You need to provide more info on this functionality to get further if it still doesn't work...
}
PaulG
  • 668
  • 5
  • 10
  • can u look the other answer please – Emre Birinci Jul 09 '20 at 14:11
  • Ok - your friend's project obviously references/imports a library that defines a bunch of js functionality like .turn(..) and addPage(..) - If you can get access to a running page of your friend's website...look into the source of the page for – PaulG Jul 20 '20 at 14:46
0

Its my friend project and ı try to understand this project so i found somethings. Look at this.

missing: function (event, pages) {

            

                for (var i = 0; i < pages.length; i++)
                    addPage(pages[i], $(this));

            }
        }

I found this function for add pages.So how can i edit page[0] ? I want to map this image and go to the page 1 2 3 or something. $("#flipbook").turn("page", 10); this is work but i need to edit page[0] and call the turn page function