• Hi

    Has anyone successfully changed the onclick action of the Thickbox effect? When thickbox image is open I want it to go to next image when clicked rather than the image closed.

    Any tips appreciated.

Viewing 9 replies - 1 through 9 (of 9 total)
  • I did it by modifying the thickbox.js file in wp-includes\thickbox\

    I removed <a href='' id='TB_ImageOff' title='"+thickboxL10n.close+"'> from the line jQuery("#TB_window").append(... which is just after the //End Resizing comment (line 135 for me).

    Hope that helps

    Paul

    P.S. Oops, just saw that you wanted next image. I’ll see if I can figure that one out.

    Sorta found it.

    Replace id='TB_ImageOff' with id='TB_next'.

    Problem is that once it gets to the last pic and you click on it thickbox closes. If that is your intent than it should work. Otherwise I will see what I can come up with. Question was left un-answered on the Thickbox forum so I will need to start thinking ??

    Paul

    Thread Starter hammertime79

    (@hammertime79)

    Outstanding Paulio, thank you.

    It would be ideal for the thickbox to remain open once the end of the gallery is reached, but not essential.

    Do you know if it’s possible to change the loading graphic? Perhaps to the circular one shown in slideshow?

    Thanks for your help on this one.

    Thread Starter hammertime79

    (@hammertime79)

    Ok think I found how to do that one. Just replace /wp-includes/js/thickbox/loadingAnimation.gif with the one from slideshow.

    Thread Starter hammertime79

    (@hammertime79)

    Hey Paulio

    I got the click on image for next thing to work, but now the actual “Next” link at the bottom of the image has stopped working. Do you have a solution for this?

    Thanks in advance.

    Yeah, I noticed that too. Finding it extremely difficult to spend time on the computer right now but this weekend should be better for that. I’ll let you know.

    I’m following this and would like the same fix. I tried substituting the code and had the same result. Next link is diabled.

    I was going to try and come up with a fix but then noticed that lightbox handles this very well so I switched. I am now using the Lightbox Plus plugin as it comes with a bunch of premade styles you can choose in admin.

    Paul

    3ring

    (@3ring)

    Hey guys I think I’ve figured this out…

    I did what Paulio recommended first:
    Replace id='TB_ImageOff' with id='TB_next' in thickbox.js around line 133.

    But the problem is the next button doesn’t work – I found a simple fix for this:

    Around line 157 of thickbox.js you’ll see:
    jQuery("#TB_next").click(goNext);

    right underneath that I just put
    jQuery("#TB_nextPIC").click(goNext);
    (essentially creating a separate jquery call)

    Then back at line 133 I changed it again to replace id='TB_ImageOff' with id='TB_nextPIC'

    Presto – the next link now works! The only issue still remaining is that thickbox closes when the last image is clicked – big deal.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘[Plugin: NextGEN Gallery] Thickbox – Click image for next rather than close’ is closed to new replies.